how to get the query reseult as a variable in php code example
Example: php fetch mysql result as variable
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
?>