oops, good point. thanks.
On Mon, 4 Mar 2002, Roger Baklund wrote:
> * Nathan Cowles
> > $query2 = "SELECT SEC_TO_TIME(TIME_TO_SEC('$lastout') -
> > TIME_TO_SEC('$firstin'))";
> > $result2 = mysql_db_query($database, $query, $connection) or die
> > ("Error in query: $query. " . mysql_error());
* Nathan Cowles
> $query2 = "SELECT SEC_TO_TIME(TIME_TO_SEC('$lastout') -
> TIME_TO_SEC('$firstin'))";
> $result2 = mysql_db_query($database, $query, $connection) or die
> ("Error in query: $query. " . mysql_error());
You are assigning the query to $query2, but you execute $query... ;)
--
Rog
>The file is attached and is also available at
>http://estore.homeip.net/time/pctimesheetnew.php.txt.; What do you mean by
>supplying a column alias...how would I do that? Thanks.
Instead of writing:
SELECT some-long-expression
Write:
SELECT some-long-expression AS xyz
Then the output colum
The file is available at
http://estore.homeip.net/time/pctimesheetnew.php.txt.; How would I supply
a column alias? Thanks.
Nathan Cowles
On Mon, 4 Mar 2002, Paul DuBois wrote:
> At 13:54 -0800 3/4/02, Nathan Cowles wrote:
> >lastout and firstin contain times such as 13:28:01 and 13:27:54.
> >
At 13:54 -0800 3/4/02, Nathan Cowles wrote:
>lastout and firstin contain times such as 13:28:01 and 13:27:54.
>
>If I use the query you gave me from within phpMyAdmin, the result I get is
>7 seconds, exactly what it should be...but I do not know how to use PHP to
>get the correct result, it is giv
lastout and firstin contain times such as 13:28:01 and 13:27:54.
If I use the query you gave me from within phpMyAdmin, the result I get is
7 seconds, exactly what it should be...but I do not know how to use PHP to
get the correct result, it is giving me 23. I am accustomed to using
mysql_result
At 13:35 -0800 3/4/02, Nathan Cowles wrote:
>Paul,
>
>You're awesome...thank you. One more question pertaining to this...
>
>I'm accustomed to selecting a variable and using something like this:
>
>$firstin = mysql_result($result,$row,firstin);
>
>to set my variable.
>
>What do I want to do here
Paul,
You're awesome...thank you. One more question pertaining to this...
I'm accustomed to selecting a variable and using something like this:
$firstin = mysql_result($result,$row,firstin);
to set my variable.
What do I want to do here to get the right result into my variable?
$query2 = "S
>Hello,
>
>I am trying to get an accurate (nearest 15 minutes would be
>fine) difference between two times that I have in my database. They are
>both of type time, and are in the format 00:00:00.
>
>For example, if I want the difference between 09:20:00 and 10:43:00, I
>would like it to give me 0