1,105,644 Community Members

Adodb on Xampp

Member Avatar
divyakrishnan
Posting Whiz in Training
243 posts since May 2010
Reputation Points: 20 [?]
Q&As Helped to Solve: 24 [?]
Skill Endorsements: 4 [?]
 
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...

Member Avatar
paulrajj
Junior Poster
102 posts since Mar 2010
Reputation Points: 6 [?]
Q&As Helped to Solve: 38 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
divyakrishnan
Posting Whiz in Training
243 posts since May 2010
Reputation Points: 20 [?]
Q&As Helped to Solve: 24 [?]
Skill Endorsements: 4 [?]
 
0
 

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

Question Answered as of 3 Years Ago by paulrajj
Member Avatar
son.anh.963
Newbie Poster
1 post since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Please provide detailed guidance

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