Hey,
Im making a script & I wanna be able to output a google ad after say, 10 outputted database querys.
How would I do this?
Thanks, Lew.
Printable View
Hey,
Im making a script & I wanna be able to output a google ad after say, 10 outputted database querys.
How would I do this?
Thanks, Lew.
I'm not 100% sure I know what you're on about. Do you mean like, grabbing a bunch of rows at the same time and displaying them in a list or whatever, and then after every tenth one put an ad?
If so, then add a counter to the loop that you're using to display the results (I assume you're using a loop anyway), then use modulus to check if the number is a multiple of 10, if it is, display the ad.
Im not using a for() loop, Im using while(). Isnt there a way to find out the amount of rows been outputed, then insert some code say after 10 rows have been outputted?
Lew.