Ron Piggott wrote:
> The following PHP command
> $new_maintainers_notes =
> returned this error while running in a ***cron***.
> Warning: mysql_real_escape_string(): Access denied for user:
> '[EMAIL PROTECTED]' (Using password: NO)
> on line 39
> Warning: mysql_real_escape_string(): A link to the server could not be
> on line 39
> $new_maintainers_notes = "Listing has been set for it's annual review";
> But when I return it from the web --- ie http://www........... no
> Any idea why the cron is upset?
mysql_real_escape_string needs to have an open connection to the db to work.
>From the docs - http://www.php.net/mysql_escape_string :
The MySQL connection. If the link identifier is not specified, the last
link opened by mysql_connect() is assumed. If no such link is found, it
will try to create one as if mysql_connect() was called with no arguments.
If by chance no connection is found or established, an E_WARNING level
warning is generated."
"Note: A MySQL connection is required before using
mysql_real_escape_string() otherwise an error of level E_WARNING is
generated, and FALSE is returned. If link_identifier isn't defined, the
last MySQL connection is used."
Some days, nothing goes left.
Today is Pungenday, the 45th day of Discord in the YOLD 3173.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php