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

From: Date: Wed, 10 Jul 2002 19:14:58 +0000
Subject: Re: How do I import tables into MySQL from web page ...
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-106926@lists.php.net to get a copy of this message
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" <danielc@analysisandsolutions.com> wrote in message news:20020710070725.GA20614@panix.com... > 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 command output on success, and FALSE on > > failure." > > > > When it says it "Returns", where does it return this information and how can > > 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." > > --Dan > > -- > 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

« previous php.general (#106926) next »