Had An Slq Syntax Error Now It Is An Undefined Index 'rating' On Line 465

Advertisement

I have a query error Quote: Error in query: SELECT rating , COUNT(*) AS rating_counts FROM rating WHERE item_name = GROUP BY rating. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY rating' at line 2 the query goes like this

Quote: $query ="SELECT rating , COUNT(*) AS rating_counts FROM rating WHERE item_name = $shoename GROUP BY rating";