>But if system() thinks it is a success because the command executed, even
>though MySQL returns an internal error on the command line, why is'nt the
>last line of the MySQL error message stored in the variable as the system()
>manual suggests it should be when system() thinks it is a success?
*M
>Thanks for pointing out the syntax error. I added the space after the -u but
>it did not make any difference. It still gives the same result, that is
>"Success", when it actually fails. What I am trying to figure out is how I
>can tell if it failed (did not create the tables)? The $status variabl
> Run the command manually at a shell prompt. What happens? Here's what
> happens for me on WinNT. In an error condition, say my password is
> invalid, it retuns the error message then a blank line and then I'm back
> at the prompt. So, if system() is true to the manual, that blank line is
> t
On Wed, Jul 10, 2002 at 07:04:58PM -0700, Fargo Lee wrote:
> But if system() thinks it is a success because the command executed, even
> though MySQL returns an internal error on the command line, why is'nt the
> last line of the MySQL error message stored in the variable as the system()
> manual
#x27; after the '/s'as well that will sort of solve that problem ..
though does create one massive block of filenames in ur browser...
Cheers
> -Original Message-
> From: Fargo Lee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 11:54 AM
> To:
But if system() thinks it is a success because the command executed, even
though MySQL returns an internal error on the command line, why is'nt the
last line of the MySQL error message stored in the variable as the system()
manual suggests it should be when system() thinks it is a success?
"Analy
I ran a few tests as well and the few system commands I tried only saved the
*last* line of the output in a variable on success as the manual suggests it
should - better than nothing - but not the entire output as you seem to
suggest you were able to do and what I have been trying to do.
"Analysi
On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
>
> This suggests, as do a few posts I just noticed in the manual, that
> one cannot assign the output of system() and perhaps passthru() and exec()
> to a variable.
I forgot to mention, that's not accurate. I just ran a test to make su
On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
>
> when made to fail MySQL does return an error on the command line yet the
> variable does not hold FALSE as the manual suggests it should or anything
> else.
The behaviour of returning FALSE upon failure has to do with the system()
cal
mand line.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Fargo Lee [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 10, 2002 1:27 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] How do I import tables into MySQL from web page ...
> &
Yes, on success the command I am issuing does not produce any output on the
command line and thus the $status variable should be blank on success. But
when made to fail MySQL does return an error on the command line yet the
variable does not hold FALSE as the manual suggests it should or anything
t; From: Fargo Lee [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I import tables into MySQL from web page ...
>
> Thanks for pointing out the syntax error. I added the space after the
-u
> but
> it di
On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:
> got it to assign a 0 (success) or 1 (failure) to the return_var argument as
> you suggested so I am happy.
Good!
> What mixed me up and I still don't understand is the manual entry for
> system() says ...
>
> "Returns the last line
Thanks for pointing me in the right direction. Could not get the output
(success or failure) assigned to a variable in front of the system call but
got it to assign a 0 (success) or 1 (failure) to the return_var argument as
you suggested so I am happy.
What mixed me up and I still don't underst
On Tue, Jul 09, 2002 at 10:59:04PM -0700, Fargo Lee wrote:
>
> Thanks but it still returns "Success" on a failure. If anyone knows if it is
> even possible to assign the output of system, passthru or exec to a variable
> to check for success or failure and how to do it, please advise. The $status
On Wed, Jul 10, 2002 at 01:08:38AM -0400, Adam Alkins wrote:
>
> From: "Analysis & Solutions" <[EMAIL PROTECTED]>
>
> > On Tue, Jul 09, 2002 at 06:09:36PM -0700, Fargo Lee wrote:
> > >
> > > $status = system("mysql -umyuserid -pmypassword mydbname <
> >
> > You need a space between "-u" and "my
Thanks but it still returns "Success" on a failure. If anyone knows if it is
even possible to assign the output of system, passthru or exec to a variable
to check for success or failure and how to do it, please advise. The $status
variable seems to always be empty on success or failure when I try
On Wednesday 10 July 2002 13:27, Fargo Lee wrote:
> Thanks for pointing out the syntax error. I added the space after the -u
> but it did not make any difference. It still gives the same result, that is
> "Success", when it actually fails. What I am trying to figure out is how I
> can tell if it f
Thanks for pointing out the syntax error. I added the space after the -u but
it did not make any difference. It still gives the same result, that is
"Success", when it actually fails. What I am trying to figure out is how I
can tell if it failed (did not create the tables)? The $status variable do
And also the "-p"
--
Cheers,
Adam Alkins
http://www.rasadam.com
--
- Original Message -
From: "Analysis & Solutions" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 11:02 PM
Subjec
On Tue, Jul 09, 2002 at 06:09:36PM -0700, Fargo Lee wrote:
>
> $status = system("mysql -umyuserid -pmypassword mydbname <
You need a space between "-u" and "myuserid"
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
21 matches
Mail list logo