Jump to content

[SOLVED] Sql error...


Demonic

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.