Menu
I have a function that needs to return the sum of selected rows of a database.
[code=php]
$query = mysql_query(‘SUM(image_size) FROM image WHERE user_id = “‘.mysql_real_escape_string($_SESSION[‘user_id’]).'”‘);
I’m pretty sure that line of code works. I’m stumped as far as how to display the value. I tried return mysql_result($query); as well as a few other things, but nothing worked.
Thanks everyone!