PDA

View Full Version : MYSQL: Addressing similarly named rows in vbTemplates


memobug
11-03-2004, 01:20 AM
I am doing a left join and have now have two parameters called "title":

p.title=title of the post
t.title=title of the thread

The vbtemplate can only seem to address $latest[title]. How do I discriminate between one and the other? I tried $latest[p.title] or $latest[t.title], but the template compiler didn't like that.

Thanks

Matt

Brad
11-03-2004, 02:46 AM
In your SELECT query call them as something else

SELECT p.title AS posttitle, t.title AS threadtitle

memobug
11-03-2004, 03:46 AM
Thanks a million Brad - that works great!

Regards,

Matt

leftjoining my way to fame & fortune