MySQL to flat file to web

A

Anonymous

Guest
Hey all, me again.

Trying to sort out the logic for my ecom site to do the following...

MySQL will have N number of records associated with it, want to randomize records, say 50 records, out of it into a flat file, preferably a CSV file.

Then want to use PHP to build an array containing the records from the flat file, then randomize entries, say 10 records, into the website.

Any ideas on that logic? I want to keep the stress on the db down, so that is why I am thinking of using a flat file that i will update every couple weeks to contain new records.

Thanks.
 
phpNUKER said:
MySQL will have N number of records associated with it, want to randomize records, say 50 records, out of it into a flat file, preferably a CSV file.

Well, which is it, MySQL or flat file?

Any ideas on that logic? I want to keep the stress on the db down, so that is why I am thinking of using a flat file that i will update every couple weeks to contain new records.

Don't bother. MySQL is designed to handle tables with millions of records and hundreds of transactions per second. Unless you're anticipating more than, say, 100,000 hits/day, worrying about "stressing" the database is unnecessary.
 
just in case....

you can use php and then use "mysqldump" binary..

remember this will require execute permission....!!!
 
Back
Top