Hi...

I am using xampp-win32-1.7.3.I want to use Adodb.I had seen that adodb is included on xampp package(xampp/php/pear/adodb).I had used the following code to retrieve data from mysql database.

<?php
include("adodb.inc.php");
$db = NewADOConnection('mysql');
$db->Connect("localhost", "root", "", "emp");
$result = $db->Execute("SELECT * FROM employ");
if ($result === false) die("failed");
    while (!$result->EOF) {
       for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
              print $result->fields[$i].' ';
       $result->MoveNext();
   print "<br>n";
}
 ?>

It displays the following error messages

Warning: include(adodb.inc.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\divya\adodb\adodbex.php on line 2

Warning: include() [function.include]: Failed opening 'adodb.inc.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\divya\adodb\adodbex.php on line 2

Fatal error: Call to undefined function NewADOConnection() in C:\xampp\htdocs\divya\adodb\adodbex.php on line 3

I had included the path of adodb onto php.ini.


include_path = ".;C:\xampp\php\PEAR;C:\xampp\php\PEAR\adodb"

Pear package is working properly...I didn't see any installation file for adodb..
Please help me .....
Thanks...

Recommended Answers

All 3 Replies

Hi,

As you are using the built in PEAR php class, you need to give an absolute path of the class.
Change this instead of the first line,

include("adodb/adodb.inc.php");

For your info,
adodb

Now it is working....Thank You Very Much..

Please provide detailed guidance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.