Hello all, I am trying to get a specific value from a mysql_query. This Query returns a table with 1 row and 1 column. I want to use the result inside the table to do a If statement and am having trouble.
here is some of the code.
[code] $table_name2 = “members”;
$sql2="select Sum(level) from $table_name2 where username = $aname";
$result2=mysql_query($sql2);
[/code]
this code should return a table where the value inside it is an int. I want to do something like this with the result
if( $result2 > 2){ do this
but it is not doing this. Is there a way to get the value out of the table to compare.
Thanks in advance