robert_gsfame Posted March 16, 2011 Share Posted March 16, 2011 is it okay to name a column "date" in a table ??? just want to know whether this could mess up everything thx in advance Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/ Share on other sites More sharing options...
litebearer Posted March 16, 2011 Share Posted March 16, 2011 IMHO it is best to avoid using names (columns as well as variables that are used by php/mysql/etc - perhaps adding a suffix or prefix that better identifies AND avoids confusion. Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/#findComment-1188120 Share on other sites More sharing options...
Adam Posted March 16, 2011 Share Posted March 16, 2011 Unlike you may expect, "date" isn't a reserved keyword within MySQL -- and in-fact isn't with most DB platforms. You won't need to use `back-ticks` around it to avoid any syntax errors. So yeah, it's okay to use. Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/#findComment-1188121 Share on other sites More sharing options...
robert_gsfame Posted March 16, 2011 Author Share Posted March 16, 2011 thx everyone Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/#findComment-1188123 Share on other sites More sharing options...
Adam Posted March 16, 2011 Share Posted March 16, 2011 For future reference, you can check the manual for a list of reserved words: http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/#findComment-1188124 Share on other sites More sharing options...
robert_gsfame Posted March 16, 2011 Author Share Posted March 16, 2011 thx so much MrAdam!!!really helpful Link to comment https://forums.phpfreaks.com/topic/230795-basic-question/#findComment-1188140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.