I have a SQL statement that doesnt seem to be working, I've spent over an hour asking how to show what the statement looks like example:
$result = mysql_query("SELECT * FROM myTable WHERE id=$my_id AND status=$active");
Now all I need to do is view what the actual SQL is passed so I imagine it looks like this:
SELECT * FROM myTable WHERE id=2 AND status=4
I know this is probably super simple but the keywords im searching is not bringing back the answers, I've tried print_r, echo $result, mysql_fetch_array, etc. and it's not really getting what I need, can someone put me out of misery and tell me how I can get back the hour of my life i just wasted?
echo "SELECT * FROM myTable WHERE id=$my_id AND status=$active"?mysql_*functions: This extension is not recommended for writing new code. Instead, either the mysqli or PDO_MySQL extension should be used. See also the MySQL API Overview for further help while choosing a MySQL API.