Thanks - I'm still very hazy on this, done a lot of searching and I'm still really none the wiser.
The way I've visualised this now is that the database queries are pulled and put into a variable (ie - $ads_id = $row->id; - which should pull from the row 'id' then put that into the variable $ads_id) or this is how I've interpreted it to be, then the $ads_id can be reused in the template.
If I've done this wrong please correct me - I'm a little unsure about the code you showed above, it makes some sense, but I have no idea where I would put the database query results.
Basically - I need these variables to achieve what I need:
$row['id']; - this is the id of the item
$row['title']; - this is the title of the item
$row['userid']; - this is the userid from the table, which is left joined to the user table, so that the username can be pulled
$row['username']; - this is from the user table, so that the username can be output rather than the userid
I hope this makes some sense, I'm just lost in translation between php and vbulletin!
Thanks for your help,
Jason
|