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
else. 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 think this is only possible using backticks, which I can't
use as this needs to be run in safe mode. So I guess I just need to use the
return_var as you suggested. Thanks!
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
> > you suggested so I am happy.
> > What mixed me up and I still don't understand is the manual entry for
> > system() says ...
> > "Returns the last line of the command output on success, and FALSE on
> > failure."
> > When it says it "Returns", where does it return this information and how
> > it be captured for comparison?
> The thing that's tripping you up is, I believe, executing MySQL programs
> at a prompt doesn't produce any visible output. But, if you executed a
> command that returns some output to STDOUT, like "ls", you'd see the last
> line of output therefrom in the "Return."
> PHP classes that make web design easier
> SQL Solution | Layout Solution | Form Solution
> sqlsolution.info | layoutsolution.info | formsolution.info
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php