I have the following code for a mySQL query in php:
 

$text = "sort_text";

$query = "SELECT code FROM links ORDER BY $text WHERE ".$text." like '".$l."%'";

$result = mysql_query($query) or die("Query failed");

When I do the query I get Query failed.

When I remove the sort parameter they are all printed correctly(except the fact the aren't in alphabetical order)

I am a newbie so be nice.

Any Ideas?

JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Reply via email to