visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
262 experts, 1140 registered users, 1615 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

We now celebrate our 5 years of existence and break our frequentation records... Here are the stats of those 5 years.

Databases :: MySql :: i want to write (echo)messages in the mysql script file and want to display them


By: irfan India  Date: 07/05/2008 17:05:31  English  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 English  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 English  Type : Comment
ok ? If no more feedback, then close the Question...

Do register to be able to answer

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page generated in 4546.195030 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page