Hi I am using the query for the grand total of the adjusted price. Here's my query and it returns nothing: $sql = "SELECT service_ordered, admin_comments, adj_price, sum(adj_price) as tot_price from services_ordered where services_ordered.client_id=$_POST[c_id] group by service_ordered"; PHP: I have checked the value in the where clause its working fine but still not working. i don't know why? Any idea!
$sql = "SELECT service_ordered, admin_comments, adj_price, sum(adj_price) as tot_price from services_ordered where services_ordered.client_id=".$_POST['c_id']." group by service_ordered"; Try that
Are you sure that $_POST['c_id'] contains a value that MySQL can search for (ie, it's a value in the client_id column)? If it's not returning any errors, then it normally means that it wasn't able to find what it was asked to.