Re: DB_Table Question: Do I have to bind the table to a database table?
| From: | Mark Wiesemann | Date: | Sun, 20 Nov 2005 17:03:38 +0000 |
| Subject: | Re: DB_Table Question: Do I have to bind the table to a database table? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22022@lists.php.net to get a copy of this message | ||
"Jay Callicott" wrote:
> I am using the DB_Table (HTML Quickform) input forms for all my forms
> and I would also like to use that feature for other forms as well and
> enjoy the data validation and consistent "look and feel" but I don't
> want to be forced to bind those other forms to a live database
> table--does that make sense? Do I have to just ignore the DB_Table
> stuff and use HTML_Quickform directly? I want do to whatever is
> quickest and easiest.
You can use DB_Table without using a real database table. Just set the
third constructor parameter to false or leave it out completely (==>
DB_Table won't create a database table).
The first parameter has to be a valid PEAR::DB instance always, but the
second parameter (the table name) can be empty or any string.
Mark