Re: cvs: pear /DB/DB common.php
| From: | cox at idecnet dot com | Date: | Tue, 11 Jun 2002 14:02:02 +0000 |
| Subject: | Re: cvs: pear /DB/DB common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4552@lists.php.net to get a copy of this message | ||
> > How sounds:
> >
> > - buildManipSQL($table, $table_fields, $mode, $where = false)
> > - autoPrepare($table, $table_fields, $mode, $where = false)
> > - autoExecute($table, $fields_values, $mode, $where = false)
> >
> > $table_fields -> ordered array
> > $fields_values -> assoc array
>
> It sounds fine to me ! :-)
>
> > Why you pass an assoc to the actual autoPrepare()? I guess that
normally
> > one has the table names in one side and the values in another.
>
> I use an assoc to perform the autoPrepare() then execute() by using
a single
> array. It's true that autoPrepare doesn't need values of the assoc.
>
> But if I write autoExecute(), I don't need at all values in
autoPrepare().
>
> So, it's perfect. I will commit this.
>
> And if it is ok for all, I will write the xml documentation for
autoPrepare()
> and autoExecute() and maybe a little auto*() tuturial.
Great! That will make easier for the people to write the code or
maintain database schema changes.
> Just one question for buildManipSQL : private or public method ?
I guess that it doesn't hurt to have it public. +1 for public here.
Tomas
V.V.Cox
------------------
Idecnet Correo-Web