Moderately difficult SQL/PHP question?

jdr0317

New member
Okay so I'm trying to write a PHP script extracting from MySQL where I take data from two days from one user and compare the days.

From a certain table (call it TableA), I first need to get the days (I have the PHP code to get the dates dynamically, making it a non-issue here). Essentially, a query selecting the user and a certain day's total (call it total) where the date is a certain day (say, '2010-05-04').

Then I need to run another one, same thing, except '2010-05-03'

Then I need to join these two at user, and report their totals from each day in one column. From there, I can perform the calculations I need to run the correct report.

So is it possible to store the result of a query in PHP for later use?
 
Back
Top