On 5/5/06, Rhino [EMAIL PROTECTED] wrote:
- Original Message -
From: Payne [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, May 05, 2006 12:09 AM
Subject: Output to a file
Hey,
been trying to output a select statment to a file, all the books I have
only show how to input
- Original Message -
From: Payne [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, May 05, 2006 12:09 AM
Subject: Output to a file
Hey,
been trying to output a select statment to a file, all the books I have
only show how to input from a file, what is the correct way
Payne wrote:
Hey,
been trying to output a select statment to a file, all the books I
have only show how to input from a file, what is the correct way
I thought I could do select * from my_toy `/tmp/my_toys`
But I get an error.
Payne
You can use the 'tee' command, eg:
tee
Hi Payne.
Payne wrote:
Hey,
been trying to output a select statment to a file, all the books I
have only show how to input from a file, what is the correct way
I thought I could do select * from my_toy `/tmp/my_toys`
You can do 'select * into outfile from table name;'
But I get
As for your second question, SELECT INTO OUTFILE (making sure mysql user has
write privileges in the directory/file you want to write to).
MySQL give the example:
SELECT a,b,a+b INTO OUTFILE '/tmp/result.text'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ''
LINES TERMINATED BY '\n'
FROM
On Monday 24 March 2003 06:09, Scott Haneda wrote:
I want to send the results of
Select name, email from messages
To a plain text file, how can I do this?
The solution:
SELECT name,email FROM messages INTO OUTFILE '/tmp/my-file-name';
Scott HanedaTel:
hi...
pls try this...
mysql \T c:\result.txt
mysql select name, email from messages;
after command executed...
you can use this command to stop print result to file.
mysql \t;
mysql
have a nice try :-)
Ivan Paul
MySQL, Query
- Original Message -
From: Scott Haneda [EMAIL
Patrick,
Thursday, September 26, 2002, 3:38:24 PM, you wrote:
PF I'm new to MySQL. I've been able to query the database via PHP and display
PF it within a html page. I would like to out put the results to a flat file
PF tab delimited instead of onto a new page.
Use SELECT INTO OUTFILE: