Clinton Posted June 7, 2008 Share Posted June 7, 2008 I need to set my query with two WHERE clauses. What's wrong with the code below? SELECT * FROM masterlist WHERE producttype = 'MS NONEL' AND delete = '0' ORDER BY datecode Link to comment https://forums.phpfreaks.com/topic/109178-solved-whereand-help/ Share on other sites More sharing options...
GingerRobot Posted June 7, 2008 Share Posted June 7, 2008 delete is a reserved word in mysql. Either place backticks(`) around the fieldname or (better) rename your field. Link to comment https://forums.phpfreaks.com/topic/109178-solved-whereand-help/#findComment-560044 Share on other sites More sharing options...
Clinton Posted June 7, 2008 Author Share Posted June 7, 2008 Forgot about those reserved words. That was the problem. Thank you. Link to comment https://forums.phpfreaks.com/topic/109178-solved-whereand-help/#findComment-560047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.