Jump to content

Comparing Records


doubledee

Recommended Posts

 

That isn't what I asked about...

 

I asked how to do math on RECORDS (as opposed to VALUES).

 

Even more so, if I had 100 records, and I wanted to subtract adjacent Records, then how would I do that?

 

Record 1 - Record 2

Record 2 - Record 3

Record 3 - Record 4

:

:

:

 

 

 

Debbie

 

Link to comment
https://forums.phpfreaks.com/topic/259183-comparing-records/#findComment-1328652
Share on other sites

SQL isn't designed to operate on pairs of rows -- you'll have to fake it with a user variable, or use a self-join, assuming you "know" how to find record N+1.

 

So INSERTING a new record everytime a User hopes from Page to Page and then trying to subtract the TimeStamps of each record to determine the "Time on page" wouldn't be a good strategy, huh?

 

 

Debbie

 

Link to comment
https://forums.phpfreaks.com/topic/259183-comparing-records/#findComment-1328827
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.