Mysqli

4 posts by 4 authors in: Forums > CMS Builder
Last Post: February 26, 2014   (RSS)

By incube - December 19, 2013

Would it be in the future plan to integrate CMSBuilder with the mysqli extension ?

PHP 5.4 has depreciated the extension of mysql

Thank you

By Dave - December 20, 2013

Hi incube, 

I would just add that when we first released CMS Builder we actually used all the mysqli_ functions, but we had to replace them with mysql_ function due to lack of support for mysqli_ by the big web hosting companies.  

So it's always been our preference to use the more modern functions, but we need to make sure they're supported on real world web servers.  It will likely be quite a while before those functions stop being available, the PHP developers tend to play things a bit fast and loose and from time to time remove a feature only to add it back later.

If they throw deprecation errors on mysql functions I suspect that will cause a lot of headaches for anyone running older Wordpress, etc installs.  There's an article about them planning to remove the MySQL extension here: http://www.phpclasses.org/blog/post/153-The-Plot-to-Kill-PHP-MySQL-Extension.html

I'll make a note to test this for an future release.  If PHP 5.4 throws deprecated errors we'll issue a maintenance release to hide those, and then hopefully as there is enough community support for it, we'll switch to mysqli or something more modern.

Dave Edis - Senior Developer
interactivetools.com

By kitsguru - February 26, 2014

I think you need to address this sooner rather than later. It is not that onerous to develop code that can be use with mysql or mysqli and branch accordingly. Here is a sample:

$g_link = mysql_connect( 'localhost', 'username', 'password')
if
(is_resource($g_link)&& get_resource_type($g_link)=='mysql link'){
  echo
'MYSQL';
} else {
  if(is_object($g_link)&& get_class($g_link)=='mysqli'){
    echo 'MYSQLI';
 
}
}

Jeff Shields