The following query is fetching some product info on a page which is fine, but I also want to show the number of the product that it occurs as a text, however, I used grou
grou
Your query won't work. Try like this;
"SELECT pro_id,count(*) FROM cart WHERE session_id='" . $_SESSION['session'] . "' GROUP BY pro_id "
Use this query:
"SELECT pro_id,count(pro_id) FROM cart WHERE session_id='" . $_SESSION['session'] . "' GROUP BY pro_id "