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 suggests it should be when system() thinks it is a success?

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 last line, so it's the one that gets put into the variable.

Put the returned string through ord() and see what you get.  I'll bet it's
10, the ordinal number for a line break.  Hmm...  Maybe not...  Out of
curiosity, I tested it on my system and it came back as 0 (a null string,
but not a null variable).


PS:  Please be kind enough to make the effort to appropriately trim the 
messages you're replying to.  Top posting is bad enough.

               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

Reply via email to