> where $month, $day and $year are got from a form in the previous page via
> POST method.
> So the LIKE condition matches against the "date" field in the table, where
> the format is like "Jun 7 2002"
> if I switch connTime, startTime and stopTime to TIME types, I get the
> I said
> I'll try the things you've told me and the mysql_error() as Chris said

You're LIKE clause is wrong / invalid

If $expression holds an HOUR field, it should be LIKE '$expression%';

if $expression holds a MINUTE field, it should be LIKE '%$expression';

having a LIKE '%$expression%' WILL NOT work... The % in a LIKE clause,
indicates that MySQL should have data BEFORE and AFTER $expression in the
column before it will be returned.  Because it's a TIME column, and the way
in which you use $expression, it will either have only a % (additional data)
before, or after $expression, or NOT AT ALL.

So, the three options you have for this....

WHERE field LIKE '%$expression'  /  WHERE field LIKE '$expression%'  /
WHERE field='$expression'

That's the only three options you have from what I see here... I've tested
all of this just now, and they all work wonderfully.

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

Reply via email to