View Single Post
 
Old March 23rd, 2007, 09:03 PM
jmaronilla jmaronilla is offline
Friend of Wrox
 
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

harpua,
I am not sure about the functions you are asking.
My suggestion is to try doing it by time trial,
Let say, have a Time difference query or function to
know in actual datas. Like an onclick button in PHP
will show you the time difference from one to the other.
An example is this with series of sqls to execute.
GROUP 1... COUNT() ----> GET RESULT
1) FUNCTION BY COUNT:
SELECT COUNT(*), NOW() AS TimeBefCount FROM tablename;
exec....
assign to a variable cn1 = countresult
                     tm1 = timebefcount

2) Add another sql INSERT
exc...

3) REDO NO. 1

4) CALCULATE THE DIFF BETWEEN RESULT OF 3 AND 1.

GROUP 2... SQL_CALC_FOUND_ROWS ----> get result
ETC...

hope this helps.
john