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 to use "LIKE"?

I want to match a string from one table with a string 
from another table so I can display the data from the 
matched record. 

select movietable.id, movietable.songname, songs.id, 
songs.songname FROM movietable, songs WHERE 
movietable.songname = songs.songname;

Results: Empty set (0.19 sec)

This doesn't work either
select movietable.songname, movietable.ID, 
songs.songname, songs.id FROM movietable, songs WHERE 
movietable.songname = "Empire";

Yet, I know that movietable.songname contains a song 
called "Empire" and movietable.songs also contains a 
song called "Empire"

How do I match the two strings?

Running Linux with MySQL-3.23.32-1.7

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to