I've got a table in my SQL Database, and the table has two fields, one for an id, and the other for an integer. I want to grab the value in the integer field where the id is equal to a specific number I pass in. The id field is called "id" and the integer field is called "loglevel". This is the code I've got, but it doesn't give me the desired result.
$result = mysql_query("SELECT loglevel FROM Logs WHERE id='$number'");
echo "Pulled from SQL: " . $result;
The output for this is
Pulled from SQL: Resource id #2
Can you help me so the output is "2" if the value in the SQL table is 2?