Well, you have to tell MySQL somehow how to connect those two
tables. You may want to check the syntax for JOINS to understand
what's going on.
> I have two tables:
> whenever I tried doing this select, mysql would hang
> indefinitely trying to resolve it or at least took
> toooo long I would rather shutdown the whole machine.
> SELECT m.username, m.class, u.password
> FROM masterlist m, user u
> WHERE m.class <> '' LIMIT 20;
> However, when I include "u.username = m.username" in
> the WHERE field, it immediately produces the result
> in 0.0x seconds.
> Why does it hang on the 1st case? was it because there
> were cases wherein a row in masterlist is not present
> in user list that's causing it to croak?
--
Herzlich
Werner Stuerenburg
_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de
---------------------------------------------------------------------
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