I have the following variable in my php code.
$data = mysql_query("SELECT * FROM shirts WHERE active='true' ORDER BY '$field' '$direction'; ");
at the end of this line of code there are two variables; $field and $direction.
The query is not working right because there is no space between the two when php passes the query into MySQL.
How do I insert a break in there so this query will work????
Spaces in php character string for MySQL query...
1 reply to this topic
Posted 05 September 2006 - 11:40 AM
$data = mysql_query("SELECT * FROM shirts WHERE active='true' ORDER BY '$field','$direction'");
That's the beauty of asymmetric warfare. You don't need a lot of money, or an army of people. You can do it from the comfort of your living room, with a beer in your hand.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users