Subject Re: PDO
Author darren_pwrs
Ok got PHP_intebase working and am now working on generating a
html_TreeMenu from a database query.

I'm using HTML_TreeMenu and loopping through my results but i keep
getting this message "Call to a member function addItem() on a
non-object". I have done hardly any OOP but I think the problem is
somewhere in the this code:

while($row = ibase_fetch_object($result)) {
echo $row->Name .'<br>';
echo 'Parent, '.$row->ParentId .'<br>';
echo $row->ID .'<br>';
// populate variables from db...
$branch_parent = $row->ParentId;
$branch_value = $row->Name;
echo 'branch, '.$branch;
$branch = $db->f("ID");
$branch_parent = $db->f("ParentId");
$branch_value = $db->f("Name");*/

// Build tree...
if($branch_parent) {
$$branch = &$$branch_parent->addItem(new HTML_TreeNode(array('text'
=> $branch, 'link' => $branch_value, 'icon' => $icon, 'expandedIcon'
=> $expandedIcon)));
} else {
$$branch = new HTML_TreeNode(array('text' => $branch, 'link' =>
$branch_value, 'icon' => $icon, 'expandedIcon' => $expandedIcon));
$tree[$i++] = &$$branch; // Indexed reference for final tree

//$Result = $db->next_record();
} //wend

thanks for all the help, some time even the smallest comments just
seem to make things click.

--- In, Lester Caine <lester@l...> wrote:
> darren_pwrs wrote:
> > Hi all. I'm pretty new to php and to this group so I hope you can all
> > bear with me.
> > I'm just started working with firebird and php together and wanted to
> > know if any one has used PDO extention for PHP5? If not then can you
> > let me know what extention I need to intall to work with Firebird? I'm
> > using PHP5 and I tried enabling ;extension=php_interbase.dll but that
> > didn't work so I've started using PDO.
> And PDO is working?
> PDO does not have all of the 'nice features' of php_interbase, so we
> have not been bothering to even test it :(
> So the question has to be - Why did php_interbase not work for you. I
> use it in conjunction with ADOdb without a problem :)
> > If any one knows of a good site for PDO that would be great to.
> Since it has not even gone to a production release yet, there is very
> little support, and unless someone fancies playing with it, the
> driver for it will not be developed much above the simple stuff!
> --
> Lester Caine
> -----------------------------
> L.S.Caine Electronic Services