[Wolves] Scuba php calculator

Wayne Morris wayne at machx.co.uk
Mon Mar 14 13:22:04 GMT 2005


Wayne Morris wrote:

>
> This all seems a bit easy, am I missing anything?

Ergh, arrays, can't do them!
Can someone point me in the right direction what to do, here is a sample 
of the data I want to select from and output:

      10m    12m    15m
A    10        9         8
B     19       16       13
C    25        22       17

The way you would use the table is to choose column for your depth and 
then look down it for the time you spend at that depth,
using the next highest number to your time, then the result is the 
letter at the side.
So 19 mins at 10m would be B, 22mins at 12m would be C, 16 mins at 15m 
would be rounded up to 17 mins at 15m = C

I was going to do this with a separate table for each depth, and a field 
for each time interval and do a select like
(Input query 10m and 25 mins)
Select * from table 10M where timefieldname= 25,  result would be C   - 
ok so far.

but for where the timedata was not matched in the table , I would either 
have to do some sort of fancy lookup:
select next highest timefieldname
or create a timefieldname for every possible time, and then enter the 
results for each.

Or am I going about this the wrong way?

Help!















More information about the Wolves mailing list