View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 06:21 AM
Dan Buettner
 
Posts: n/a
Default Re: --xml or --html output to file

Hi John -

using --xml or --html as an argument and redirecting to a file seems to work
here. As in,

mysql -u me -psecret -D database --html -e "select * from that_table" >
~/test_file.html

HTH,
Dan



On 5/8/07, John Kebbel <kebbelj@scripting-solutions.com> wrote:
>
> When I try using the --xml or --html option with a batch file using INTO
> OUTFILE 'dirpath', the --xml or --html option seems to be ignored in
> favor of the tab-delimited default. (If I get rid of the INTO OUTFILE,
> xml or html displays fine in the terminal.)
>
> I tried using the pager to write to a file from inside MySQL. I
> succeeded, but it was table data. I couldn't figure out how to add the
> --xml or --html options from inside the pager.
>
> I tried the redirection operator from the command line, but I haven't
> stumbled on the correct syntax if such a syntax does exist.
>
> Does anyone know how to write an --xml or --html file from a SELECT
> statement, either from the command line or from a batch file? This would
> really be useful information.
>
> Thanks in advance for reading or responding.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=drbuettner@gmail.com
>
>


Reply With Quote