Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing large amount of text from a db to file

Status
Not open for further replies.

Guggly

Programmer
Jan 18, 2004
110
US
Hi! What's the best way that I can get a large amount of text data (nearly 2 mb) from a database (probably MSSQL, very slight chance of MySQL) and then write it to a txt file? I could do it by querying the data into a recordset (about 5,000 rows) and then iterate through and write it to file with fwrite, but I’m concerned about the large amount of data needing to be processed and thus that this will be too slow.

Is there a better way to go about it, or would PHP not be the best thing to perform such a task? Thanks! -- Mike
 
Check the export utilities for the db...most have the option to write to a text file...

If mssql then you can also use any number of office apps to get the data...like excel or access
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top