I have a PHP script and for some reason mysql keeps treating the value to select/insert as a column. Here is an example of my sql query:
$query = mysql_query("SELECT * FROM tutorial.users WHERE (uname=`".mysql_real_escape_string($username)."`)") or die(mysql_error());
That turns into:
SELECT * FROM tutorial.users WHERE (uname=`test`)
The error was:
Unknown column 'test' in 'where clause'
I have also tried:
SELECT * FROM tutorial.users WHERE uname=`test`