RE: [PHP] date range assistance needed
| From: | John W. Holmes | Date: | Tue, 04 Mar 2003 01:28:40 +0000 |
| Subject: | RE: [PHP] date range assistance needed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138009@lists.php.net to get a copy of this message | ||
What does $qAnnouncement look like if you echo it out? Does it look
correct? Are you sure the variables you're passing to strtotime() are
correct? What does mysql_error() say after you run this query?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
> -----Original Message-----
> From: charles kline [mailto:ckline@ydim.com]
> Sent: Monday, March 03, 2003 6:22 PM
> To: php-general@lists.php.net
> Subject: [PHP] date range assistance needed
>
> Here is my current query:
>
> $qAnnouncement =
> 'SELECT id,headline
> FROM tbl_funding
> WHERE 1
> AND ((UNIX_TIMESTAMP (datestamp) >= ' .
> strtotime($attributes[startdate]) . ') AND (UNIX_TIMESTAMP (datestamp)
> <= ' . strtotime($attributes[startdate]) . ')) LIMIT 0, 30';
>
> Where datestamp is set in MySQL with a timestamp(14) and
> $attributes[startdate] and $attributes[enddate] are in the format
> mm/dd/yyyy
>
> My query does not return any results. I know there must be something
> wrong, can anyone point it out?
>
> Thanks,
> Charles
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php