Re: Date Calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wouldn't just making the script get 2 time stamps be more efficient, since you are creating the database calls anyways? Or am I over simplifying it?

<?php

// current time at start of script
$before = strtotime("now");

//All your DB stuff
{
 ....
}

// current time at end of script
$after = strtotime("now");

$timed = ($after - $before);
echo 'Time for script to execute: ' . $timed .' seconds';
?>

Robert

<SNIP>
Mike Tuller is quoted as saying on 10/28/2004 5:19 PM:
Ok, so here is what I have. Please check to see if there is a better way. There are a lot of database calls to me.
</SNIP>

--
Robert Sossomon, Business and Technology Application Technician
4-H Youth Development Department
200 Ricks Hall, Campus Box 7606
N.C. State University
Raleigh NC 27695-7606
Phone: 919/515-8474
Fax:   919/515-7812
robert_sossomon@xxxxxxxx

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux