Looked all over. Can’t find an answer. PHP docs not clear (to me).
I’m doing a simple MySQL sum through mysqli->query. How can I get the result with MySQLi like mysql_result?
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.
Whatever is given in the SELECT statement to mysqli_query is going to return a mysql_result type if the query was successful. So if you have a SELECT statement such as:
you still need to fetch the row with the result, and the value of the sum() function will be the only entry in the row array: