MySQL Forums
Forum List  »  Newbie

Re: [SOLVED!] Ascii text boxes disappear when query output is redirected
Posted by: Michael Lueck
Date: August 21, 2010 03:25PM

Ken Butcher gets the prize for the correct answer!

Ken Butcher wrote:
> If you want to retain the table formatting, use the --table (-t) option

His site I found quite useful:
and his answer solved the mystery of where the ascii art table was disappearing to.

The working syntax is as follows:

MYSQL='/usr/bin/mysql -u uid --password=****** db'
$MYSQL -te 'SELECT DISTINCT `message`, `location`, `referer` FROM `watchdog` WHERE `referer` LIKE "" AND `type` = "page not found" ORDER BY `location`, `referer`;'

And usage is as I posted originally:

./ 2>&1 | /usr/bin/mailx -s "Test Query Email" root

Michael Lueck
Lueck Data Systems

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.