I have some issue with a sql query using quotes with variables. (In general I use "bind" so I don't have this kind of problem). Here's the query :
$myquery = mysql_query("SELECT * FROM mytable ORDER BY id ASC WHERE var='".$var."'");
The syntax seems not to be correct, can anybody help ?
ORDER BYandWHEREclauses, not because of the quotes. If you fix the clause order, your query will work (albeit still vulnerable to injection), so there is no point to keep asking how to fix your quotes.