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
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
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