Jump to content


This topic is now archived and is closed to further replies.


cd.categories? c.categories_id? what does it mean?

Recommended Posts

I've found my way around osCommerce pretty well, but I've never taken the time to figure out what those prefixes are on the table names in database queries:


$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES etc. etc.


You know - the cd and c. Sometimes they're there, sometimes not.


I looked through the knowledgebase & couldn't find anything about it. It's not a pressing issue, I'm just curious; and I figure that at some point it'll be valuable information.





Share this post

Link to post
Share on other sites

If you look a bit further along the query for will see




the c and cd parts are used as aliases as it is much quicker to type c.categories_id that it is to type categories.categories_id :)

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)



Software is like sex: It's better when it's free. (Linus Torvalds)

Share this post

Link to post
Share on other sites