Group: php.db · Group Profile · Search for Dbpass in php.db
Author: Gav
Date: Aug 31, 2008 03:45
.oO(Ian Pawson) If possible it is best to use the oop interface, as in $query = "SELECT COUNT(*) FROM dvds"; $result = $mysqli->query($query); $entries = $result->fetch_row(); The mysqli object is created with:- // try to connect to mysql and to the database $mysqli = new mysqli(dbhost, dbuser, dbpass, dbname); /* check connection */ if (mysqli_connect_errno()) {
|