I had several plugins die with my recent upgrade to 1.5.3 with the error message:
mysql_real_escape_string(): A link to the server could not be established
This seems to stem from two problems. First you shouldn't be using the mysql functions and instead use the internal database functions:
http://www.zen-cart.com/wiki/index.p...ers_-_Database
Secondly mysql isn't used any more, instead using mysqli.
The fix is simple (Thanks to lat9 in another thread for pointing this out.)
Instead of mysql_real_escape_string($value) use:
$db->prepare_input($value)
To those in charge. Perhaps the above developers/database wiki should be updated to include $db->prepare_input.
Anthony
Bookmarks