0

So I have this query but the error is wrong syntax around '%'$txt2',%' - what would I have to change this too please... thanks
What I am looking for in the field is anything that has txt2, with things after it or just txt2 on its own without anything after it. How would I do this please alltogether.
Thanks.

$result = mysql_query("SELECT * FROM table WHERE field LIKE '%'$txt2',%' ORDER BY field ASC") or trigger_error(mysql_error().$sql);

Edited by mpc123: left out rest of question

1
Contributor
1
Reply
10
Views
4 Years
Discussion Span
Last Post by mpc123
0

Sorry , looks like i have sold it with

$result = mysql_query("SELECT * FROM table WHERE field LIKE '%$txt2,%' OR field = '$txt2' ORDER BY field ASC") or trigger_error(mysql_error().$sql);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.