Gorilla3D Primative Teachings
Gorilla Db - (Improved) MySQLi Wrapper
Sunday, August 3, 2008
I've updated my mysqli wrapper to handle binds better and easier to new people trying to use prepared statements. I've also added Non-Filtered binds, because I'll also be release my Table class to help with simple queries you always end up running.
Db is a connection manager, it will use the connection you first create throughout your application. You can continue to call Db:init() and as long as a connection has already been made, you can run queries. Best of all It has prepared statements thanks to Wrapping MySQLi. For documentation and download please visit Gorilla Labs
//-- Prepared Statements // Execute a query $db->prepare('SELECT * FROM blog_entries WHERE id=?')->bind(23)->query(); // or $db->prepare(SELECT * FROM blog_entries WHERE id=?); $db->bind(23); $db->query(); // you can also stack binds $db->prepare('SELECT * FROM blog_entries WHERE id=? and title=?') ->bind(23)->bind('Hello World')->query(); $db->prepare('SELECT * FROM blog_entries WHERE id=? and title=?') $entry = $db->fetchOne(); // you can do can use them all in the same parameter $db->prepare('SELECT * FROM events WHERE name LIKE ? OR name LIKE ? and location LIKE ?') ->bind('%My%', '%Event%', '%San%') ->query(); // you can do can use an array and if they have keys you can assign you ?'s to them $db->prepare('SELECT * FROM events WHERE name LIKE ?arg1 OR name LIKE ?arg2 and location LIKE ?') ->query(); // a cleaner example notice they can be in any order but you probably shouldn't $db->prepare('SELECT * FROM events WHERE name LIKE ?arg1 OR name LIKE ?arg2 and location LIKE ?') ->query(); // and yes keys can be used multiple times $db->prepare('SELECT * FROM events WHERE name LIKE ?arg1 OR name LIKE ?arg1 and location LIKE ?') ->query();
pcdinh posted 33 days ago
http://labs.gorilla3d.com/ is dead
Moreover, the page http://gorilla3d.com/gorilla_labs contains no information about this package