Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-11 Thread Richard Lynch
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-11 Thread Richard Lynch
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?

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
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. ?php system(mysql -u myuserid -pmypassword

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis Solutions
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 of the

RE: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread John Holmes
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 did not make any difference. It still gives

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
- 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 did not make any difference.

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis Solutions
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() call

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis Solutions
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 sure.

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
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.

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
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?

RE: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Peter
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: [EMAIL PROTECTED] Subject: Re: [PHP] How do I import tables into MySQL

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Analysis Solutions
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Fargo Lee
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 the

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Analysis Solutions
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Adam Alkins
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 Subject: Re: [PHP] How do I import tables into MySQL from web

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Jason Wong
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 failed

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Fargo Lee
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

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Analysis Solutions
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 myuserid And also the -p

Re: [PHP] How do I import tables into MySQL from web page ...

2002-07-09 Thread Analysis Solutions
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