...

View Full Version : variable labeling inside a query



achira
04-16-2012, 03:18 PM
A quick question:

If there is only one place in my database with the column name "apples" then I do not have to include the table name before the $apples variable in my INSERT query, is that correct?

Fou-Lu
04-16-2012, 03:55 PM
If it never causes a conflict, and isn't a reserved word, then no you don't need to prepend the field with the table.
Although, since a lot of field names are reused between multiple tables, especially ones with relationships, a table name or alias is required during joins so it knows which table to draw from. For consistencies sake, that alone is a reason to always use a table.field syntax.

achira
04-16-2012, 03:57 PM
Ok thank you!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum