Saturday, January 19, 2008
PHP mysql quick reference
$mysqli = new mysqli($host, $login, $pw, $database);
if ($result = $mysqli->query('SELECT name from employee'))
{
while( $row = $result->fetch_assoc() ){
echo "".$row['name']."
";
}
/* Destroy the result set and free the memory used for it */
$result->close();
}
/* Close the connection */
$mysqli->close();
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment