SILNTBOB Posted March 10, 2008 Share Posted March 10, 2008 I have a most likley very easy one to answer. I am in the process of writing a PHP and MySQL program that converts a text file into an array and then dumps it into a database, I have that part working. For an example of the data I am working with here is a link to one of the text files. http://themis.ssl.berkeley.edu/EPO_Access/files/ccnv/2008/thg_l2_mag_ccnv_20080101_v01.txt (~7mb) Just need to load up a few lines to get a feel for it. 1st value is time in secs 2nd value is X 3rd value is Y 4th value is Z I am loading each file in to a database that is layed out as Date, Time, X, Y, Z I have a SQL query that will select the Max(x) Min(x) AVG(x) AVG(y) AVG (z) for each date. What I need is to have it select three or four blocks of time and process those out separately per day. I can post the PHP code I have right now if needed. I can/would like to Figure out the if statements and while loops to get it to work pretty much just want the SQL statement that will grab, for example the AVG (x) for the time block of 0.408 - 32000.000 on the date of 20080101 Hope this can be done. Thanks, Clark Milholland Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.