Home > Archive > MySQL ODBC Connector > April 2006 > how to quit a (CLI) script ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to quit a (CLI) script ?
C.R.Vegelin

2006-04-03, 9:29 am

------ =_NextPart_000_0009_
01C65735.CDFBEB00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everyone,

I use many scripts that are started from the CLI (MySQL 5.0.15).
And if errors occur, I want to quit a script. I looked at:
http://dev.mysql.com/doc/refman/5.0/en/show-errors.html
and found Show Count(*) Errors; and for Select @@error_count;
But how to quit a CLI script, if @@error_count > 0 ?
Any ideas are most welcome.

TIA, Cor
------ =_NextPart_000_0009_
01C65735.CDFBEB00--


Kishore Jalleda

2006-04-03, 11:26 am

------ =_Part_1084_19426561
.1144078366352
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I am not sure if you can do this from the Mysql CLI, but a better way of
doing this would be to use an external script like PHP, PERL, BASH,
etc as they have a better way of error checking againest Mysql.

Kishore Jalleda
http://kjalleda.googlepages.com/projects

On 4/3/06, C.R.Vegelin <cr.vegelin@hetnet.nl> wrote:
>
> Hi everyone,
>
> I use many scripts that are started from the CLI (MySQL 5.0.15).
> And if errors occur, I want to quit a script. I looked at:
> http://dev.mysql.com/doc/refman/5.0/en/show-errors.html
> and found Show Count(*) Errors; and for Select @@error_count;
> But how to quit a CLI script, if @@error_count > 0 ?
> Any ideas are most welcome.
>
> TIA, Cor
>


------ =_Part_1084_19426561
.1144078366352--
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com