astralaaron Posted July 27, 2011 Share Posted July 27, 2011 Hi I am having a strange problem that I've been stuck on all day. Please help.SELECT `x_info`.`UID`, `x_info`.`company`, `x_info`.`state`, `x_info`.`h_phone`, `x_info`.`fax`, `x_info`.`b_phone`, `x_info`.`fax`, `x_info`.`b_phone`, `x_info`.`addr`, `x_info`.`city`, `x_info`.`zip`, `z`.`UID`, `z`.`username`, `z`.`fname`, `z`.`lname` , `z`.`email` FROM `z` LEFT JOIN `x_info` ON `x_info`.`UID` = `z`.`UID` WHERE `z`.`UID` > 0 AND `x_info`.`zip` IN (89108,89109,89118)The query works when I test it inside of phpMyAdmin (SQL tab) but in php mysql_query returns false. does anyone know why this might be happening?(x and z aren't the real table names) Link to comment Share on other sites More sharing options...
Ingolme Posted July 27, 2011 Share Posted July 27, 2011 Echo the value of mysql_error() to see what it says about your query. Link to comment Share on other sites More sharing options...
astralaaron Posted July 27, 2011 Author Share Posted July 27, 2011 Oh man . was a simple fix. wrong database was being selected. thank you for pointing that out Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.