Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
RodG's post (http://www.zen-cart.com/showthread.p...53#post1230753) should be a wake-up call to any plugin authors who use PHP mysql* functions rather than using the Zen Cart $db-related functions. Since v1.5.2 converted to use mysqli* functions, any plugin that uses mysql* functions will experience an error when used in v1.5.2.
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
If only the following PHP mysql* functions need upgrading:
mysql_fetch_array
mysql_query
then for me it looks like these important mods will require an upgrade:
SuperOrders
EasyPopulate4
OzPost
But are there any other PHP mysql* functions that need to be addressed?
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
There are many others:
http://www.php.net/manual/en/ref.mysql.php
But which of these PHP mysql* funcitions are not compatible with zencart 152.
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
Quote:
Originally Posted by
dw08gm
I'm guessing that the answer is "none of them".
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
Whoops. My bad. Briefly confused mysql* with the mysqli* functions.
What I intended to ask is whether any of the PHP mysqli* functions are incompatible with or otherwise to be replaced by specific Zen Cart 152+ $db-related functions.
Happy Holidays
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
Quote:
Originally Posted by
dw08gm
Whoops. My bad. Briefly confused mysql* with the mysqli* functions.
What I intended to ask is whether any of the PHP mysqli* functions are incompatible with or otherwise to be replaced by specific Zen Cart 152+ $db-related functions.
Happy Holidays
Understood, since mysqli* does fall under mysql*! I should have more properly phrased the functions as mysql_*.
Just like the previous versions of Zen Cart abstract the database calls (using mysql_* functions) via the query_factory class, v1.5.2 provides the same interface abstraction using mysqli_* calls -- thus making the transition from the (now deprecated) mysql_* calls transparent to any code that calls the $db interface (or the zen_db* functions). If I found the need to use a mysqli_* function that is not currently abstracted by the Zen Cart database class, I'd create a suggestion for Zen Cart to include that function's processing within the database class structure.
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
Since it sounds like ZC v1.5.3 is coming soon, I thought that I'd refresh this thread to remind plugin authors to check their plugins for compatibility with ZC 1.5.2 (and later) relative to the use of any PHP mysql_* direct function calls. Since the $db object in ZC 1.5.2+ uses a mysqli interface, it is incompatible with any use of PHP mysql_* functions!
Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
Clarification: The current version of PHP is what's incompatible with the old mysql_xxxx() function calls.
Your custom code should always be using the built-in $db object, and NOT writing your own direct calls to mysql_xxxx() or mysqli_xxxxx() functions.
And, keep in mind that the syntax is different between the mysql_xxxx() and mysqli_xxxx() functions. You can't just change them out for the other ones. You must also change a number of parameters. THAT is one big reason why you should just use the built-in $db object methods in your ZC plugins. And also the fact that the $db object handles security correctly, and making your own calls to mysql functions does not.