 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
visage
Joined: 05 Mar 2008 Posts: 1 Location: Toledo, OH
|
Posted: Wed Mar 05, 2008 6:16 am Post subject: PEAR::DB woes |
|
|
Hey all. I'm having a strange problem with the old PEAR::DB extension.
I can get a valid database connection object, but whenever I try to run queries, I get an error result object saying "DB: No database selected", even though I've clearly got one selected as part of the DSN.
I've got some output which I'll link to below from pastebin, rather than clogging up space here.
The first bit is output from the DB object, the lower part is output from a simple query string result object.
Can someone tell me what I'm doing wrong, as this is driving me nuts.
Unfortunately, the host is not mine, but a client's, and they don't support MDB2 on it.
http://pastebin.ca/928556
Many thanks. |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Wed Mar 05, 2008 10:27 am Post subject: Re: PEAR::DB woes |
|
|
| visage wrote: | | I can get a valid database connection object, but whenever I try to run queries, I get an error result object saying "DB: No database selected", even though I've clearly got one selected as part of the DSN. |
Maybe a problem with the include_path, causing DB not being able to find its files? The following lines might help to find the problem (insert them at the start of your script):
| Code: |
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
|
| visage wrote: | | Unfortunately, the host is not mine, but a client's, and they don't support MDB2 on it. |
You can always install PEAR and every package yourself, there is no need to rely on your host. |
|
| 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
|
|