PHP Class for MySQL and Prepared Statements Reference
Posted on August 27th, 2010 by egiles
For prepared statements in PHP / mySQL check out:
http://mattbango.com/notebook/web-development/prepared-statements-in-php-and-mysqli/
Combine that with:
<?php
class MySqlDriver {
private $_Link;
public function __construct( <…> ) {
$this->_Link = mysql_connect( <…> );
}
// this will be called automatically at the end of scope
public function __destruct() {
mysql_close( $this->_Link );
}
}
$_gLink = new MySqlDriver( <…> );
// and you don’t need [...]
Filed under: Technology | No Comments »