wright67uk Posted February 24, 2011 Share Posted February 24, 2011 $query =mysql_query ("SELECT email FROM treesurgeons WHERE postcode like '%" . $shortcode . "%' AND confirmed = 'Yes' ORDER BY companyName LIMIT 3"); Ive had a syntax issue since Ive added AND confirmed = 'yes' I want to return results if the value in my column named 'confirmed' reads the value 'yes' How should I put this into my query? Quote Link to comment https://forums.phpfreaks.com/topic/228676-where-and-where/ Share on other sites More sharing options...
Muddy_Funster Posted February 24, 2011 Share Posted February 24, 2011 Syntax should work looking at it, what's the error your getting? Quote Link to comment https://forums.phpfreaks.com/topic/228676-where-and-where/#findComment-1179015 Share on other sites More sharing options...
fenway Posted February 24, 2011 Share Posted February 24, 2011 Post your actual raw SQL query Quote Link to comment https://forums.phpfreaks.com/topic/228676-where-and-where/#findComment-1179106 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.