Say I have a page that will have a finite number of ads (0,1,2,3,4,5,...).
Now, I'll query the db and get say 50 ads from it (if there are 50 entries in this db).
Now i would like to be able to show only a certain number of ads at any time, but this number will change (and another ASP script will change it).
so basically i can say
numAds = GET_NUMBER_OF_ADS_SOMEHOW
for(i=0; i < numAds; i++) {
//print ad
}
but how can i keep track of this "NUMBER OF ADS" number?
The possible solutions I've come up with are
- another database table for constants
- using an XML file
- writing to a text file (which i really dont wanna do cuz then i'll have to parse and re-write for every modification, etc.)
which of these would you think is best, or any other way recommended?
Thank You
- Tharsan
Now, I'll query the db and get say 50 ads from it (if there are 50 entries in this db).
Now i would like to be able to show only a certain number of ads at any time, but this number will change (and another ASP script will change it).
so basically i can say
numAds = GET_NUMBER_OF_ADS_SOMEHOW
for(i=0; i < numAds; i++) {
//print ad
}
but how can i keep track of this "NUMBER OF ADS" number?
The possible solutions I've come up with are
- another database table for constants
- using an XML file
- writing to a text file (which i really dont wanna do cuz then i'll have to parse and re-write for every modification, etc.)
which of these would you think is best, or any other way recommended?
Thank You
- Tharsan