FirefoxRocks 0 Report post Posted January 29, 2009 (edited) I'm trying to select records that have an ending event date/time after the current date/time. I have tried using a PHP variable $now=date("Y-m-d H:i:s");, CURDATE() as well as UNIX_TIMESTAMP in combination with strtotime("now");, but so far nothing is working. SELECT * FROM `events` ORDER BY `eventStart` WHERE `eventEnd`>$now Somehow I keep getting this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/portal/public_html/sandbox/<blocked>/calendar/calendar.php on line 63The eventEnd field is a MySQL datetime field: "YYYY-MM-DD HH:mm:ss"How do I do this? Edited January 29, 2009 by FirefoxRocks (see edit history) Share this post Link to post Share on other sites
FlashNet 0 Report post Posted April 23, 2009 What code are you using for parce response from db?I suppose that mysql returns number of rows ( > 1). So you can't use such result with mysql_fetch_array() . In this case you have to use mysqli_multi_query. Examples ca be found here. Share this post Link to post Share on other sites