Re: DataObject - DB Error : not found
| From: | William | Date: | Thu, 18 Jul 2002 03:03:55 +0000 |
| Subject: | Re: DataObject - DB Error : not found | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1925@lists.php.net to get a copy of this message | ||
Which ini file? The one I used to generate the classes with or the one
contains the DB structures?
Cheers,
William
----- Original Message -----
From: "Alan Knowles" <alan@akbkhome.com>
To: "William" <william@adtio.com>
Cc: "Tomas V.V.Cox" <cox@idecnet.com>; <pear-general@lists.php.net>
Sent: Thursday, July 18, 2002 10:51 AM
Subject: Re: [PEAR] DataObject - DB Error : not found
> have you got
> [DB_DataObject]
>
> inside the ini file?
>
>
> William wrote:
>
> >1. I've printed out the $config, I only found the DB structure there, no
> >DB_DataObject array.
> >
> >2. I have both 'c:\php\pear' and 'c:\php\pear\DB' in my php.ini include
> >paths. And I can run DB object in another project.
> >
> >3. My PEAR modules is under 'c:\php\pear', which came with the PHP 4.2.1
> >binary zip. Do I have to put them under 'c:\php4\' folder?
> >
> >Cheers,
> >William
> >
> >----- Original Message -----
> >From: "Alan Knowles" <alan@akbkhome.com>
> >To: "William" <william@adtio.com>
> >Cc: <pear-general@lists.php.net>
> >Sent: Wednesday, July 17, 2002 9:06 PM
> >Subject: Re: [PEAR] DataObject - DB Error : not found
> >
> >
> >
> >
> >>William wrote:
> >>
> >>
> >>
> >>>Thanks!
> >>>I have put the lines altogether, but the result is the same; "DB Error:
> >>>
> >>>
> >not
> >
> >
> >>>found".
> >>>
> >>>Here is my codes,
> >>>
> >>><?php
> >>>require_once ('PEAR.php');
> >>>require_once ('DB\DataObject.php');
> >>>
> >>>DB_DataObject::debugLevel(5);
> >>>
> >>>$options =
> >>>&PEAR::getStaticProperty('DB_DataObject','options');
> >>>
> >>>$config = parse_ini_file('soccer.ini', TRUE);
> >>>
> >>>
> >>>
> >>try print_r($config); here - has it got an array for DB_DataObject?
> >>
> >>
> >>
> >>>$options = $config['DB_DataObject'];
> >>>
> >>>require_once ('Competition.php');
> >>>
> >>>$comp = new DataObjects_Competition;
> >>>$comp->get(3);
> >>>print_r($comp);
> >>>?>
> >>>
> >>>And I have this in php error log,
> >>>'PHP Notice: Undefined index: DB_DataObject in
> >>>c:\project\testing\pear\dataobjects\test1.php on line 9'
> >>>
> >>>Sorry to bother you with this silly things! :-(
> >>>
> >>>
> >>>
> >>>
> >>It's ok, its been very usefull for seeing where the documentation is
> >>missing - hopefully when alexander finishes of peardoc2, then we can
> >>have comments on the manual - it should help alot..
> >>
> >>regards
> >>alan
> >>
> >>
> >>
> >>>Cheers,
> >>>William
> >>>
> >>>----- Original Message -----
> >>>From: "Alan Knowles" <alan@akbkhome.com>
> >>>To: "William" <william@adtio.com>
> >>>Cc: <pear-general@lists.php.net>
> >>>Sent: Wednesday, July 17, 2002 6:38 PM
> >>>Subject: Re: [PEAR] DataObject - DB Error : not found
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Have you loaded the configuration:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
>
>>http://pear.php.net/manual/en/packages.database.db-dataobject.introduction
.
> >>
> >>
> >p
> >
> >
> >>>hp
> >>>
> >>>
> >>>
> >>>
> >>>>| require_once('PEAR.php');
> >>>> $options =
> >>>> &PEAR::getStaticProperty('DB_DataObject','options');
> >>>> $config = parse_ini_file('example.ini',TRUE);
> >>>> $options = $config['DB_DataObject'];
> >>>>
> >>>>
> >>>> // use one of the extended classes.
> >>>>
> >>>> require_once('DataObjects/Person.php');
> >>>>
> >>>>I guess the other examples should illustrate this somehow
> >>>>
> >>>>you can always turn on debugging to get more details about what is
going
> >>>>
> >>>>
> >>>>
> >>>>
> >>>on
> >>>
> >>>
> >>>
> >>>
> >>>>DB_DataObject::debugLevel(5);
> >>>>
> >>>>regards
> >>>>alan
> >>>>|
> >>>>
> >>>>
> >>>>William wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>I follow the manual on the pear.php.net and runs these
> >>>>>
> >>>>><?php
> >>>>>require_once('Person.php');
> >>>>>
> >>>>>$person = new DataObjects_Person;
> >>>>>$person->get(1);
> >>>>>print_r($person);
> >>>>>?>
> >>>>>
> >>>>>I only have 'DB Error : not found' printed on the paper.
> >>>>>What's the
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>meaning
> >>>
> >>>
> >>>
> >>>
> >>>>>of it?
> >>>>>I am sure the table and record are exists there and I made the
> >>>>>
> >>>>>
> >DataObject
> >
> >
> >>>>>Classes by Auto Builder.
> >>>>>
> >>>>>Thanks in advance!
> >>>>>
> >>>>>Cheers,
> >>>>>William
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>--
> >>>>PEAR General Mailing List (http://pear.php.net/)
> >>>>To unsubscribe, visit:
> >>>>http://www.php.net/unsub.php
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >>--
> >>PEAR General Mailing List (http://pear.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>