Processing Logic

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Processing Logic

Post 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
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post 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?
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

Yeah, not enough information
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post by facets »

I worked it out.
Sorry to bother everyone!
Post Reply