Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Which database extension is used?

posted by welja 9 years ago

If i look at the method fDatabase->determineExtension() http://flourishlib.com/api/fDatabase#determineExtension i get the impression that the slower mysql extension is used even when the better mysqli extension is available.

Is this correct?
Is there a way to manualy use the mysqli extension?

			case 'mysql':
			
				if (extension_loaded('mysql')) {
					$this->extension = 'mysql';
					
				} elseif (class_exists('PDO', FALSE) && in_array('mysql', PDO::getAvailableDrivers())) {
					$this->extension = 'pdo';
					
				} elseif (extension_loaded('mysqli')) {
					$this->extension = 'mysqli';
					
				} else {
					$type = 'MySQL';
					$exts = 'mysql, pdo_mysql, mysqli';
				}
				break;

I've raised a ticket (http://flourishlib.com/ticket/372) for this, and have mentioned it to Will in the past, so hopefully this'll be fixed soon :-)

posted by vxnick 9 years ago

My experience with the Flourish test suite has indicated that the mysql extension seems to be the fastest, but it isn't much different than mysqli, and I've never timed either one.

I will look into switching the order from mysql to mysqli, mysql, pdo in the near future. If you really don't want it to use the mysql extension for now, you could unload the extension.

posted by wbond 9 years ago