Mysql table join fails
| From: | Arnand Balsekar | Date: | Tue, 22 Aug 2000 11:05:27 +0000 |
| Subject: | Mysql table join fails | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2256@lists.php.net to get a copy of this message | ||
Hi everyone,
I've got a problem joining tables across databases using PHP 4.0.0 and
Mysql 3.23.16.
I have 2 setups - 1 at home and one at work. The query is fine at home
where I am running PHP 4.0.1, but at work (PHP 4.0.0) the page is blank
when I would expect to see data returned.
I can't believe this is a bug in 4.0.0, and just wondered if there are
any config parameters which would prevent me joining tables across
databases?
Has anyone had this experience?
Thanks in advance.
Arnie.
Query is :
SELECT mp3.id, mp3.filename, mp3.title, mp3.album, g.genre AS genre,
m.mood AS mood, t.tempo AS tempo,
mp3.file_length, mp3.year, mp3.comments, mp3.song_length,
mp3.media_type, mp3.banned_for,
mp3.on_hold, a.name AS artist, mg.name AS master_copyright, pg.name AS
publishing_copyright
FROM musicstate.track AS mp3, track_info.genres AS g, track_info.moods
AS m, track_info.tempo AS t,
musicstate.artist AS a, musicstate.master_groups AS mg,
musicstate.publisher_groups AS pg
WHERE mp3.genre_id = g.id AND mp3.mood_id = m.id AND mp3.tempo_id =
t.id
AND mp3.artist_id = a.id AND mp3.master_group_no = mg.group_no
AND mp3.publisher_group_no = pg.group_no AND contract_id = $id