Re: MySQLi Extended Class
Just a question, why aren't you putting the connect in __construct and the disconnect in __destruct? Makes more sense to have this handled automatically. I mean, the connection is closed regardless of calling mysql_close, just an observation.
Re: MySQLi Extended Class
Yea i know, it's only like that because when i was building query builder, i kept getting connection errors, when i wasn't even intending of a connection.
I will be changing it sometime later today.
Re: MySQLi Extended Class
It would only connect when the class was called, and there isn't a reason for the class to be called unless a database connection is intended.
Re: MySQLi Extended Class
Quote:
Originally Posted by
Ron
It would only connect when the class was called, and there isn't a reason for the class to be called unless a database connection is intended.
Yep, It'll only be called upon request, so it will only connect upon query & stuff.
Re: MySQLi Extended Class
You should include anti sql injection. This would be the main reason to use a class instead of plain SQL.