From: "Chris Knipe" <[EMAIL PROTECTED]>
>
> Talking under correction, but you'll be better of using a TIME column in
> MySQL.  You can also do all the calculations with MySQL's build in time
> functions already, which will save you allot of time, seeing that all the
> calculations can be done via a single SQL query.

Yes, this is the first thing I thought, but doing this I get an error when
getting the records.. I'm using the following code:

<SNAP>
$result = mysql_query("SELECT * FROM tableNameWHERE field LIKE
'%$expression%'");

while ($line = mysql_fetch_array($result)) {
   $startTime   = $linea["startTime"];
   $stopTime    = $line["stopTime"];
}
<SNAP>

If the fields are CHAR or VARCHAR I got no problem, but if a use a TIME type
I get the following error:
"Warning: Supplied argument is not a valid MySQL result resource in
/var/www/text.php on line XX"

what am I missing? the mysql_fetch_array should only be used with CHAR types
and so? what should I use then?

thanks again for the help

juaid



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

Reply via email to