[wp-hackers] How to determine install version of MySQL?
lloydomattic at gmail.com
Tue Jan 22 18:19:10 GMT 2008
On Jan 22, 2008 10:13 AM, Williams Phillip <phil.m.williams at gmail.com> wrote:
> The conversation here awhile back regarding SQL queries brought up an
> issue that I have with a my archive filter plug-in. To filter the the
> archives I am using a query similar to the one in wp_get_archive.
> However, there is a subquery that I use to limit the posts to those
> included (or excluded) from specified categories. Since WP supports
> older versions of MySQL that do not support subqueries, the plug-in
> would not work.
> Is there a hook/method that I could use to not allow the plug-in to
> be activated unless MySQL is v5 or better?
I don't think there currently is, but I'm definitely no expert.
If I was writing it, a true novice, I would first try to borrow some
of the code from:
wp_check_mysql_version() in wp-admin/includes/upgrade.php
More information about the wp-hackers