hi
i have a SELECT * FROM cards WHERE card_name LIKE xmas
this query is fine and working
however when i try to to mysql_fetch_array for this query, i get an error
this does not happen when card_name LIKE xmas is an integer card_id = 1 rather than a text
does anyone know how i may still output the results of a query which uses a text as condition?
select with string condition display problem
Moderator: General Moderators
-
keymistress
- Forum Newbie
- Posts: 3
- Joined: Wed Dec 25, 2002 10:03 pm
- Location: singapore
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
try
you will need the quotes around the string
Code: Select all
SELECT * FROM cards WHERE card_name LIKE 'xmas'-
keymistress
- Forum Newbie
- Posts: 3
- Joined: Wed Dec 25, 2002 10:03 pm
- Location: singapore