I am using group by ID WITH ROLLUP in my mysql query. The thing is I want to store these totals in a variable in php. Is there any way to do that?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes – it returns ordinary rows just like any other query would. The total can be recognised because the ID will be NULL for that row. So when you are iterating over the rows, check to see if the ID is NULL and if that happens, set the variable that you wish to set.