try this:

if (900<=$time && $time<=1500) {$time = 1;}

olinux


--- [EMAIL PROTECTED] wrote:
> Hello,
> 
> I've been working on pulling one or more records
> from my db by the time of
> day. Here is what I've tried so far,
> <?
> $time = date("Hi");
> if (900<=$time<=1500) {$time = 1;}
> ?>
> I would then use $time in a query like this,
> $result = mysql_query("SELECT * FROM table  WHERE
> id= $time",$db);
> 
> But I can't get the IF statement to work, I've tried
> several different
> variations. All I get is parse errors. I not sure
> how to add the second <=.
> When I do this,
> if (900<=$time) {$time = 1;}
> it works.
> 
> Thanks in advance for the help,
> 
> Mike
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system
> (http://www.grisoft.com).
> Version: 6.0.319 / Virus Database: 178 - Release
> Date: 1/28/02
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to