Jeff Williams - 2007-07-01 19:35:10
WARNING: You will have to make a few small changes in order to integrate this class into code written with previous versions.
* The name of the class has been shortened to 'MySQL'
Instead of
$db = new UltimateMySQL();
Now use
$db = new MySQL();
* The methods GetBooleanValue, IsDate, SQLBooleanValue, SQLFix, SQLUnfix, SQLValue, and Test are now static. Instead of calling them with '$objectname->' you will reference them by 'MySQL::'. Also, you will not need to create a MySQL object to use these methods now.
Instead of
$db->IsDate("January 1, 2007")
Now use
MySQL::IsDate("January 1, 2007")
* Now you can connect to the database when you create the object. You can still connect using the original methods, but this is an easier way to connect. If you have filled in your connection values (lines 19-22), you can set the first parameter to true if you wish to connect or false if you do not want to connect. Lastly, you can select a database with this method as well.
Instead of (which still works)
$db = new UltimateMySQL();
$db->Open("database", "localhost", "username", "password");
Now you can use the shorter version
$db = new MySQL(true, "database", "localhost", "username", "password");
Or if you have filled in connection parameters (lines 19-22 in the class)
$db = new MySQL(); // Connects on create
$db = new MySQL(false); // Does not auto-connect
$db = new MySQL(true, "database"); // Selects a database on connect