PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Fatal error: Call to undefined method DB_Error::query()

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Networking
View previous topic :: View next topic  
Author Message
khush



Joined: 15 Feb 2007
Posts: 1

PostPosted: Thu Feb 15, 2007 7:48 am    Post subject: Fatal error: Call to undefined method DB_Error::query() Reply with quote

I am beginer in pear its my program in pear with mysql and this is in file
connect_db.php
this is giving the error
Fatal error: Call to undefined method DB_Error::query() in /home/kushpal/public_html/my_pear_project/connect_db.php on line 45
and on line 45 i m
$result = $conn->query('create table emp(id int, name varchar(20));

connectipn to database is done properly i want the proper solution.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1003

PostPosted: Sat Feb 24, 2007 2:36 pm    Post subject: Re: Fatal error: Call to undefined method DB_Error::query() Reply with quote

khush wrote:
I am beginer in pear its my program in pear with mysql and this is in file
connect_db.php
this is giving the error
Fatal error: Call to undefined method DB_Error::query() in /home/kushpal/public_html/my_pear_project/connect_db.php on line 45
and on line 45 i m
$result = $conn->query('create table emp(id int, name varchar(20));

connectipn to database is done properly i want the proper solution.


No, the connection must have failed (there are several possible reasons for that). Solution:

$conn =& DB::connect(...);
if (DB::isError($conn)) {
die($conn->getMessage() . '<br />' . $conn->getDebugInfo());
}

This will tell you why your connection has failed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Networking All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software