|
Simple SQL Query D'OH
I feel like such a dumb a** but I can't figure out how to pull one value from a database and I have searched and searched and can't find it because it is too simple and everyone knows how to do it so why put it on the internet lol. I know it is is something stupid and I just am not seeing it but here is my code:
$result = mysql_query("SELECT name FROM si_customers WHERE id='$_SESSION[user_id]'");
$customer_name = mysql_query($result);
I have verified that my sql statement works in phpmyadmin
I have verified that there is an actual value in $_SESSION[user_id]
I have verified the table name and the column names name and id
so I gotta be doing something dumb
Please help
|