jwwceo Posted September 5, 2006 Share Posted September 5, 2006 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???? Quote Link to comment Share on other sites More sharing options...
zawadi Posted September 5, 2006 Share Posted September 5, 2006 $data = mysql_query("SELECT * FROM shirts WHERE active='true' ORDER BY '$field','$direction'"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.