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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying to a TXT file

Status
Not open for further replies.

ironmunk

Technical User
Aug 21, 2001
51
CA
Hi, is there a way to run a query in MYSQL but have the output to a txt file? (maybe .CSV)?

thx.

ps. through the phpmyadmin interface.
 
I could be wrong, but phpMyAdmin does not support outputting query results other than as HTML. Entire data structures can be exported in any fashion, but not individual queries. I could see how such a feature could be handy for GUI only-users.

Of course with the programming language of your choice you could query the db directly and write the results to a file on that server however you wanted. Maybe someone is smarter than me has a clever idea
 
Code:
SELECT * INTO OUTFILE MyOutput.TXT
	FIELDS TERMINATED BY ","
	FROM MyFile
	WHERE Condition = MyCondition





[ponder]
----------------
ur feedback is a very welcome desire
 
Sorry u said PHPMyadmin. I did not see that. I have never used it However with MySql Front there is an option to copys as CSV



[ponder]
----------------
ur feedback is a very welcome desire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top