[wp-hackers] mysql_real_connect instead of mysql_connect

Jamie Talbot wphackers at jamietalbot.com
Mon Feb 26 07:01:20 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Deaton wrote:
> Yeah, there's one very good reason, there is no PHP mysql_real_connect
> function.

Heh, details, details... :)

> PHP's mysql_connect will use the C wrapper mysql_real_connect if it is
> available. What this guy wants is to be able to pass a flag to the C
> mysql_real_connect through PHP's mysql_connect. The flag he wants to
> set can in fact be used, it is in the notes section of the
> documentation [1]. How he wants to have them placed in, I'm not sure,
> wpdb is loaded long before our plugins so there really is no way for a
> plugin to set that, and I am -1 on turning this on for everyone, for
> BC reasons.

Yeah, let's not turn it on for everyone, but remember that wpdb.php can be overridden if there is a
db.php in wp-content...  He could probably create his own wpdb class to set this up correctly then...

Cheers,

Jamie.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4oXArovxfShShFARAh7pAJwKv3cYZY9NQyclU3LlrtP+QOiLWQCgkBDa
fSZjBzs9Ki6FtR9eWenbwLg=
=ht+w
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list