Log in

View Full Version : Integration: Displaying records belonging to the logged-in user


inthezone
06-13-2003, 11:22 PM
I'm trying to integrate vBulletin with another part of my website via global.php, and have created additional tables related to my non-vB pages in the vB database.

e.g.

In the vB database, I have created a table called "mysite_records." I have a field in this table called "userid" to relate it to my vB database.

I am creating a page which will display records from the custom table that belong to the logged in user, but I am unsure of how to code this.

I understand part of the query should be ("SELECT * FROM mysite_records WHERE userid=???"), but I am not sure what should be placed where the question marks are. I've tried $bbuserinfo['userid'], but that gives me a syntax error.

Edit: Typo

Xenon
06-13-2003, 11:50 PM
inside a string don't use ' for array keys :)

so $bbuserinfo[userid] will work

inthezone
06-13-2003, 11:56 PM
That was much simpler than I thought it would be. Thanks for your help!