 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
khush
Joined: 15 Feb 2007 Posts: 1
|
Posted: Thu Feb 15, 2007 7:48 am Post subject: Fatal error: Call to undefined method DB_Error::query() |
|
|
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 |
|
 |
mark

Joined: 07 Jan 2007 Posts: 998
|
Posted: Sat Feb 24, 2007 2:36 pm Post subject: Re: Fatal error: Call to undefined method DB_Error::query() |
|
|
| 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 |
|
 |
|
|
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
|
|