phat_hip_prog Posted September 10, 2007 Share Posted September 10, 2007 Hi, I've got a sql statement which works on my local machine but when transferring to hosted site fails. Yes my local version of mysql is 5.0.37 and on the host it is 4.1.22-standard. From what I can see in the manual there isn't anything different concerning the syntax used (but i'm no sql expert!), can anyone suggest what's wrong? $s = "SELECT ".$tn.".id, rip, time, response, method, link, agent, sid FROM ".$tn." left join ".$tnL." on link_id = ".$tnL.".id left join ".$tnA." on agent_id = ".$tnA.".id left join ".$tnS." on sess_id = ".$tnS.".id LIMIT ".$start.", ".$rows.""; Cheers Link to comment https://forums.phpfreaks.com/topic/68667-solved-mysql-version-prob/ Share on other sites More sharing options...
btherl Posted September 10, 2007 Share Posted September 10, 2007 What error message does mysql_error() show you? Link to comment https://forums.phpfreaks.com/topic/68667-solved-mysql-version-prob/#findComment-345183 Share on other sites More sharing options...
phat_hip_prog Posted September 10, 2007 Author Share Posted September 10, 2007 On the host nothing, I presume error messaging is turned off and because I use a wrapper with a try catch statement nothing is ever outputted anyway. I'll do a direct test page to check though. I've tried removing the limit statements, then changing the 'left join' to just join etc, but no avail? BRB Link to comment https://forums.phpfreaks.com/topic/68667-solved-mysql-version-prob/#findComment-345188 Share on other sites More sharing options...
btherl Posted September 10, 2007 Share Posted September 10, 2007 The other thing you can do is to echo out the query before executing. It's likely that the problem is not with mysql syntax, but rather with differing php configurations causing the query to be corrupted. Link to comment https://forums.phpfreaks.com/topic/68667-solved-mysql-version-prob/#findComment-345197 Share on other sites More sharing options...
phat_hip_prog Posted September 10, 2007 Author Share Posted September 10, 2007 Yes, just another manic moanday... A table wasn't getting installed, because somehow a varchar was trying to be 512??? Cheers, please have a nice day now! Link to comment https://forums.phpfreaks.com/topic/68667-solved-mysql-version-prob/#findComment-345200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.