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 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 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"; 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 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
Archived
This topic is now archived and is closed to further replies.