What does the '.id' mean? doesnt that just mean get the id from WPSC_TABLE_PRODUCT_CATEGORIES table. is that '.id' necessary? if not so, then why does 'nice-name' not have WPSC_TABLE_PRODUCT_CATEGORIES before it? THanks $sql = 'SELECT ' . WPSC_TABLE_PRODUCT_CATEGORIES . '.id, ' . WPSC_TABLE_PRODUCT_CATEGORIES . '.name, `nice-name` FROM '. WPSC_TABLE_PRODUCT_CATEGORIES . ' '; Code (markup):
The .id and the .name means that you are querying for the id and the name columns. The WPSC_TABLE_PRODUCT_CATEGORIES will end up being the actual table name.
When it's in back ticks like that it will return the value nice name every time. Without seeing the app/usage itself I can't see why someone would add that in there. I can;t think of any reason not to handle this on the application level. Basically this this query it would return something like: 1 cat_name nice name 2 other_cat_name nice name 3 yet_another_cat_name nice name