Databases :: MySql :: i want to write (echo)messages in the mysql script file and want to display them |
|||
| By: irfan |
Date: 07/05/2008 17:05:31 |
Points: 20 | Status: Answered Quality : Excellent |
|
hi, i want to write some messages(analogous to echo messages) in a mysql script file and when the user executes the sql script i want to write these messages to a file and i want to write the error .log messages to the another file(say iii.txt) How do i do this in the mysql script. regards, irfan |
|||
| By: VGR | Date: 08/05/2008 00:39:25 | Type : Answer |
|
| ok... first a "mysql" script is just a SQL script, right ? MySql has no scripting language of its own, contrarily to T-Sql or SQL*Plus for other DB systems. As far as I know, if you want to redirect the output to a text file, you can do it on the command line via the standard OS-specific redirection mechanism ( > for DOS or unix, for instance) ; you will not be able to redirect "errors" to an other file. This is not like C. Errors are printed in the output file, as results of the SQL statements that are executed. for echoing in SQL, I think the simpliest way is simply to do "SELECT 'your message';" ;-) if you find qome original way of achieving your desired result, it'll probably be of interest to other readers in here, so please update us on this issue. And don't forget to close the Question when appropriate ;-) regards |
|||
| By: VGR | Date: 02/07/2008 08:09:33 | Type : Comment |
|
| ok ? If no more feedback, then close the Question... | |||
|
Do register to be able to answer |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|









