webref.eu Posted March 20, 2009 Share Posted March 20, 2009 I need to modify this: $sql = "SELECT COUNT(*) FROM Reviews WHERE ProductId LIKE $ProductId"; to additionally include WHERE ReviewIsApproved=1. Can anyone give me the right syntax before I manage to work it out for myself? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/150383-solved-help-with-this-sql-statement-please/ Share on other sites More sharing options...
revraz Posted March 20, 2009 Share Posted March 20, 2009 Work it out and post if it doesn't work. Can anyone give me the right syntax before I manage to work it out for myself? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/150383-solved-help-with-this-sql-statement-please/#findComment-789751 Share on other sites More sharing options...
wildteen88 Posted March 20, 2009 Share Posted March 20, 2009 $sql = "SELECT COUNT(*) FROM Reviews WHERE ProductId LIKE $ProductId AND ReviewIsApproved=1"; Quote Link to comment https://forums.phpfreaks.com/topic/150383-solved-help-with-this-sql-statement-please/#findComment-789752 Share on other sites More sharing options...
webref.eu Posted March 20, 2009 Author Share Posted March 20, 2009 Thanks Wildteen88, you beat me to it Rgds Quote Link to comment https://forums.phpfreaks.com/topic/150383-solved-help-with-this-sql-statement-please/#findComment-789756 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.