Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


spoot

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.

 

Thanks,

 

Michael

Link to comment
Share on other sites

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

 

from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd

 

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)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...