Hypersource Posted November 25, 2012 Share Posted November 25, 2012 (edited) Somethings wrong with the syntax of this: $tokens=mysql_query("GET user_name FROM users WHERE user_name=$tik"); Help? error says: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GET user_name FROM users WHERE user_name=Admin' at line 1 Thanks in advance! Edited November 25, 2012 by PFMaBiSmAd removed wysiwyg formatting to fix micro font Quote Link to comment Share on other sites More sharing options...
iarp Posted November 25, 2012 Share Posted November 25, 2012 (edited) SELECT not GET. $tokens=mysql_query("GET SELECT user_name FROM users WHERE user_name=$tik"); Edited November 25, 2012 by iarp Quote Link to comment Share on other sites More sharing options...
beyzad Posted November 25, 2012 Share Posted November 25, 2012 (edited) GET? Edited November 25, 2012 by beyzad Quote Link to comment Share on other sites More sharing options...
Hypersource Posted November 25, 2012 Author Share Posted November 25, 2012 (edited) Now I get Unknown column '[whatevers int $tik variable]' in 'where clause Edited November 25, 2012 by Hypersource Quote Link to comment Share on other sites More sharing options...
iarp Posted November 25, 2012 Share Posted November 25, 2012 Is $tik quoted at any point before this query, otherwise it'll need single quotes. $tokens = mysql_query("SELECT user_name FROM users WHERE user_name = '$tik'"); Quote Link to comment Share on other sites More sharing options...
Hypersource Posted November 25, 2012 Author Share Posted November 25, 2012 Your right! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.