MySQL Forums
Forum List  »  PHP

Re: php mysql connection help..
Posted by: Jonathan Stephens
Date: June 05, 2005 01:04AM

The mysql extension isn't loaded. See the PHP documentation for info on how to load PHP extensions. If you plan to use ext/mysql instead of ext/mysqli with MySQL 4.1+, you also need to read the note on http://dev.mysql.com/doc/mysql/en/old-client.html and the pages that it links to.

BTW, the mysqli equivalent is

<?php
@$link = new mysqli('localhost', 'root', '12345');

if( mysqli_connect_errno() )
die('Could not connect: ' . mysqli_connect_error());

echo 'Connected successfully';

$link->close();
?>

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.