PHP7.2 / Website Membership V1.13 mysql_query issue

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 26, 2019   (RSS)

By daniel - March 26, 2019

Hi Jerry,

To update mysql_query() for PHP 7, you can replace it with mysqli()->query(), like this:

mysqli()->query(mysql_escapef("INSERT INTO {$TABLE_PREFIX}login_log SET...

It's likely that there are library functions better suited to this action (such as mysql_insert()), but without requiring any big modifications, the above should at least fix the error.

Also, in the future, if you suspect you're having an issue with old MySQL functions, I'd recommend checking the Legacy MySQL Scanner plugin, which can be found in any recent CMSB installation (v3.12 or later). This should let you know if that's indeed the case, and also give some idea about what needs to be replaced if it's something custom like this.

Let me know if that takes care of the issue!


PHP Programmer

By gkornbluth - March 26, 2019

Hey Daniel,

Worked like a charm...

Thank you Jedi Master!

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: