string compare problem with single quote in string

2002-06-24 Thread testacct
I am comparing songnames from two tables to find a match. My query looks like this: $querymvideo = select movietable.id, movietable.songname from movietable where TRIM(movietable.songname) LIKE '__$foo' ; The above query works fine except when a songname has the single quote symbol: ' or maybe

Strings query question

2002-06-23 Thread testacct
I do not understand string comparison. Why doesn't the following work: SELECT id, songname FROM songs WHERE songname = Empire; All I get is: Empty set (0.00 sec) I know the string exists in the database: In record 135 exists: Empire | | 135 | Do I have

Re: Strings query question

2002-06-23 Thread testacct
Thanks, that worked for song named Empire, however, when I checked other song names such as songname called One I get two results: | id | songname | +++ | 35 | You're Still The One | | 57 | One | +++ 2 rows