MadTechie Posted August 21, 2007 Share Posted August 21, 2007 $_SESSION[ic] is incorrect, yes it works but its wrong, unless ic is a constant, but as its not a constant php corrects it but will give a notice error (mild warning), use $_SESSION['ic'] instead (good habbit) Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329792 Share on other sites More sharing options...
zgkhoo Posted August 21, 2007 Author Share Posted August 21, 2007 then why `Ownerid`<--? `<--this quote i never use before, what it for? thanks. Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329795 Share on other sites More sharing options...
MadTechie Posted August 21, 2007 Share Posted August 21, 2007 i used `Ownerid` as i wasn't sure if Ownerid is a reserved word.. change it to Ownerid and if it works then its not reserved Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329799 Share on other sites More sharing options...
zgkhoo Posted August 21, 2007 Author Share Posted August 21, 2007 then `<--wat this quote meant? u meant reserved word for php or mysql? Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329800 Share on other sites More sharing options...
MadTechie Posted August 21, 2007 Share Posted August 21, 2007 its not a quote is a "backtick" its the MySQL identifiers quote character.. i am talking about MySQL reserved words An identifier may be quoted or unquoted. If an identifier is a reserved word or contains special characters, you must quote it whenever you refer to it. (Exception: A word that follows a period in a qualified name must be an identifier, so it need not be quoted even if it is reserved.) For a list of reserved words, see Section 8.3, “Reserved Words”. Special characters are those outside the set of alphanumeric characters from the current character set, ‘_’, and ‘$’. Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329803 Share on other sites More sharing options...
zgkhoo Posted August 21, 2007 Author Share Posted August 21, 2007 '{$_SESSION['ic']}' <---why this? why use { }? why not "$_SESSION['ic']" ? or ' ".$_SESSION['ic']." ' ? or '$_SESSION['ic'].' wat different between these? thanks.. Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329809 Share on other sites More sharing options...
MadTechie Posted August 21, 2007 Share Posted August 21, 2007 its my coding style {} same the ".$var." Link to comment https://forums.phpfreaks.com/topic/65814-solved-mysql-problem/page/2/#findComment-329815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.