ueon Posted August 20, 2011 Share Posted August 20, 2011 $jobs = mysql_query("SELECT * FROM work WHERE email='$request' AND primary='1'"); // This doesn't work $jobs = mysql_query("SELECT * FROM work WHERE email='$request'"); // This works I know for a fact that there's a column in work called "primary" but it's giving me this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Quote Link to comment https://forums.phpfreaks.com/topic/245296-and-not-working/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 20, 2011 Share Posted August 20, 2011 primary is a reserved mysql keyword. You either need to rename your column to something else or you must enclose it in back-ticks `` every time you use it in a query. Quote Link to comment https://forums.phpfreaks.com/topic/245296-and-not-working/#findComment-1259876 Share on other sites More sharing options...
ueon Posted August 20, 2011 Author Share Posted August 20, 2011 thanks works perfectly Quote Link to comment https://forums.phpfreaks.com/topic/245296-and-not-working/#findComment-1259878 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.