Re: Data Object get() doubt
| From: | Jacques | Date: | Sat, 12 Feb 2005 01:24:08 +0000 |
| Subject: | Re: Data Object get() doubt | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17502@lists.php.net to get a copy of this message | ||
Justin Patrin escreveu:
On Fri, 11 Feb 2005 23:03:27 -0200, Jacques <iacques@yahoo.com.br> wrote:Jacques -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10/2/2005Hi people! I have a table with primary keys that have two fields. Its possible use the get() method with this? If a PK use one field, i call $object->get('12'); # 12 is a id but if i have 2 fields in pk? Excuse-me for confusion!Not only get() but many other things won't work. DB_DataObject doe snot currently support primary keys of more than one field. I would suggest you create an auto incrementing id field for the primary key, then add a unique constraint on the other two fields. This way you have your uniqueness *and* a simple primary key. I will try . Thanks!