1.11M Members

Adodb on Xampp

 
0
 

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...

 
0
 

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

 
0
 

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

Question Answered as of 3 Years Ago by paulrajj
 
0
 

Please provide detailed guidance

Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article