Jump to content

[SOLVED] MySQL Query Help


Bopo

Recommended Posts

Hi

 

Basically I keep getting the following error, I definitely know the query is causing the error due to testing:

 

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

 

Below is the query:

 

<?php $sql = "SELECT * FROM blogposts WHERE date >= '$firstdate' AND date <= '$seconddate' ORDER BY id DESC LIMIT '$minus', '$storemultiply'";?>

 

The part that is giving me an error is: ORDER BY id DESC LIMIT '$minus', '$storemultiply' both variables store a number.

 

Help appreciated.

Link to comment
https://forums.phpfreaks.com/topic/155495-solved-mysql-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.