Web Hosting Talk







View Full Version : In need of a mysql class. [PHP]


dale1991
12-14-2006, 01:02 PM
Hello,
There are soo many mysql classes so I was wondering if anyone could suggest me one? maybe you have use/used before? or should I even use one?

Thanks. :)

insanelymacintosh
12-14-2006, 05:43 PM
IMO. Use MySQLi. It is the latest and greatest to date. I also recommend using the prepare statement any time you use the SELECT, INSERT, UPDATE, or DELETE statement.

$mysqli->prepare("SELECT bla, bla, bla FROM bla");

It does take a little more code to write, but is VERY secure when it comes to preventing sql injection attacks. Sql injection attacks are very common and are easily done by anyone who knows a little bit about PHP and SQL coding.

http://us2.php.net/mysqli

is the official link, but you should be able to find tutorials on other websites which tell you step by step how to use MySQLi.

You can check to see if your server's PHP configuration is setup with the MySQLi functions via <? phpinfo;?> and searching for 'mysqli'

Hope this help!

juangake
12-15-2006, 10:17 AM
Hello, you asked for a class, so here you have mine:

http://prisonserver.co.uk/handleMYSQL.html

Regards,

Juan