PEAR DB_Table LEFT JOIN Headache

From: Date: Thu, 15 Dec 2005 11:02:01 +0000
Subject: PEAR DB_Table LEFT JOIN Headache
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22264@lists.php.net to get a copy of this message
I'm doing a LEFT JOIN with a DB Table select and it's driving me crazy. The thing works on my windows machine but hangs when I try to access it on the server. Here's the line that's causing trouble: 'join' => "LEFT JOIN mls_image ON Residential.MLS # = mls_image.MLS_num", MLS # is the id number for one table and MLS_num is the id of an image table. Basically I want an image name for each listing and so I look up an image name in the image table by matching the MLS numbers. Now I should say there are often multiple images for an MLS # in the image table. On my machine it just grabs one, which is fine with me. All I want is to grab an image name so I can display a thumb for each listing I pull. I don't understand why the script would just hang. I can't debug the thing because I get no error, it hangs for like 10 seconds then quits, so I don't even get a blank page or anything. If you have any suggestions I'd be glad to hear it. I would really like to continue using DB_Table--what concerns me is that the query works if I build it manually and use the DB package but I hate building queries that way. I like to separate the data logic from business logic as much as possible. Thanks for the help. Jay

« previous php.pear.general (#22264) next »