Re: problem in connecting to mysql from php

From: Date: Mon, 13 Jun 2011 12:30:29 +0000
Subject: Re: problem in connecting to mysql from php
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-47842@lists.php.net to get a copy of this message
Your error message is about class not found.That means there is no class named "MySQLi".Please use a textbook with online manual http://www.php.net/manual/en/ref.mysql.php On 06/13/2011 02:08 PM, C0mf0rtably Numb wrote: > Hello everyone, > > I am in the process of learning php and I was trying to connect to a mysql > database on my own computer(localhost). I have done the following as > prerequisites: > > copied the dll files in system32 > removed the semicolon(;) from extension=php_mysqli.dll > > In spite of doing the above when I try to run the following : > > <?php > $db = new MySQLi('localhost', 'root', 'Password123', > 'test'); > $sql = 'SELECT * FROM a123'; > $result = $db->query($sql); > > while($row = $result->fetch_object()) { > echo '<div>' . $row->name . '</div>'; > } > > $db->close(); > ?> > > I get the error: *Fatal error*: Class 'MySQLi' not found in *C:\Program > Files\Apache Software Foundation\Apache2.2\htdocs\a.php* on line *2 > > *Please guide me as to how can I get rid of this error? > > Regards, > Kushal > -- Extra details: OSS:Gentoo Linux profile:x86 Hardware:msi geforce 8600GT asus p5k-se location:/home/muhsin language(s):C/C++,PHP,SQL,HTML Typo:40WPM url:http://www.mzalendo.net url:http://www.zanbytes.com

« previous php.db (#47842) next »