Demonic Posted November 4, 2007 Share Posted November 4, 2007 Some weird sql error that doesn't happen on XAMMP latest version with PHP 5.2.4 $topics = mysql_query("SELECT * FROM `topics` WHERE `fid` = '".$id."' AND `sticky` = '1' ORDER BY `timestamp` DESC LIMIT $limit_start,$total_limit"); But it just don't want to work on my linux server with PHP version 5.2.3 What exactly am I doing wrong? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 4, 2007 Share Posted November 4, 2007 What's the error? Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 4, 2007 Author Share Posted November 4, 2007 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in Works fine on: Paid Server: PHP version 4.4.7 MySQL version 4.1.22-standard Home Server: # MySQL 5.0.45 # PHP 5.2.4 # PHP 4.4.7 But doesn't want to seem to work on my other paid hosting with: PHP version 5.2.3 MySQL version 4.1.22-standard Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 4, 2007 Share Posted November 4, 2007 Put a die statement on the query $topics = mysql_query("SELECT * FROM `topics` WHERE `fid` = '".$id."' AND `sticky` = '1' ORDER BY `timestamp` DESC LIMIT $limit_start,$total_limit")or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 4, 2007 Author Share Posted November 4, 2007 Put a die statement on the query $topics = mysql_query("SELECT * FROM `topics` WHERE `fid` = '".$id."' AND `sticky` = '1' ORDER BY `timestamp` DESC LIMIT $limit_start,$total_limit")or die(mysql_error()); I did, how you think I got that error? god wtf i posted the wrong error.... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 4, 2007 Share Posted November 4, 2007 I'm pretty sure you would get that error anyways, plus you didn't add the die statement in your posted code. The error resulted from the mysql_fetch_array() which of course goes along with the query. Echo your query out to make sure the variables are coming out okay. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 4, 2007 Author Share Posted November 4, 2007 Thanks, I have no clue what happened, but some how my installation file got screwed up, thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.