Page 1 of 1

MySQL Wrapper Class

Posted: Wed Mar 18, 2009 6:15 pm
by php_east
i was looking for a convenient db wrapper, and found one

# Name: database.class.php
# File Description: MySQL Class to allow easy and clean access to common mysql commands
# Author: ricocheting
# Web: http://www.ricocheting.com/scripts/
# Update: 2/2/2009
# Version: 2.1
# Copyright 2003 ricocheting.com

i does not quite suite my wishes so i am starting to modify it slightly and am coming up with a enhanced version, though the original already wrap mysql quite nicely.

what i want is an efficient db wrapper, where almost everything will be accesible within its class. is anyone going the same way ? can we share notes ?
public use license.

thanks.

Re: MySQL Wrapper Class

Posted: Wed Mar 18, 2009 6:28 pm
by William
You might want to add the ability to connect to multiple database servers in the same instance. A good example is when you work on an application that starts to really grow you'll want to be able to send INSERT/UPDATE/DELETE (writes) query's to a master server and your SELECTS (reads) to a slave. Basically add the ability to send query's to multiple servers not just one.

Edit: You also might want to add something like...

Code: Select all

if (!$this->link_id) $this->connect();
in your query function that way you don't have to worry about running connect() before you do query's and you only connect when you actually need to send a query.

Those are just two things off the top of my head. Don't have time to really dive into it right now. Good luck!

Re: MySQL Wrapper Class

Posted: Wed Mar 18, 2009 6:31 pm
by DevGiven
I used oomysqlwrapper and I was satisfied by the functions they offer.