Page 1 of 1

Processing Logic

Posted: Thu Aug 24, 2006 7:06 am
by facets
Hi All,

Not sure how to explain this.. (Which is probably why i am stuck!)

I'm using a for loop to process data etracted from a database.
I wish to use a toggle

Code: Select all

(if payment != on)
to display a header mesage before the for loop.

Any ideas on how I could do this.. Without looping the query twice?
(Once for the header once for displaying the data.)

tks, Will

Posted: Thu Aug 24, 2006 8:01 am
by GM
I don't understand... what is this "payment" variable? A value coming from the query result set, or a php variable?

You want to check if the payment field in the data row is not equal to "on" before you process the row, or you want to check that the payment field is not equal to "on" before you process the whole result set?

Posted: Thu Aug 24, 2006 8:05 am
by BDKR
Yeah, not enough information

Posted: Thu Aug 24, 2006 8:07 am
by facets
I worked it out.
Sorry to bother everyone!