Re: DataObject find() error
| From: | Arnaud Limbourg | Date: | Thu, 12 Dec 2002 21:33:04 +0000 |
| Subject: | Re: DataObject find() error | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2967@lists.php.net to get a copy of this message | ||
> In an off-list email, Stijn de Reede suggested:
>
> /* imho it is safest to unset the reference, so that if you assign
> someting else to $options, it won't change the PEAR property */
> unset($options);
Mmm, i don't see why he would say that.
Ok, i see you really have problems and it's putting you off your schedule. Now, did you try the
connection script I sent you with the incriminated DSN ?
When you do a createtables and use the generated classes without modifying them, does it work ?
I use at work without any problem so I don't see any reason it would not work for you.
When you use the example
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$config = parse_ini_file('redbox_databases.ini', TRUE);
$options = $config['DB_DataObject'];
$mytable = new DataObjects_MyTable();
$mytable->get(2);
Does it work ? I mean i know it does not right now but try with just the generated class without
tempering with them ;)
Then you can know if the problem comes from dataobject or you ;))
Arnaud.
> I was / am confused!!
> I removed it but still get the same error, "Unable to include the
> DB/.php file for `'"
>
>
> > DataObjects needs it, the DSN is in there, that's why you get
> > the error ;))
> >
> > Plus, do a
> >
> > function &listMembers($contractedId = -1) {
> >
> > Because you want a reference returned by the method and not a copy :)
>
> Yeah ... Sure I'll do that, but for now I just wanted to var_dump() the
> output somewhere :)
>
>
> > With that it'll work.
>
> No luck sadly :-(
> It's starting to make me wonder if using DataObjects was actually a good
> idea for this project, it is already behind schedule :)
>
> - Mike Carter