Re: Problems to insert with REFERENS in database
| From: | Alan Knowles | Date: | Tue, 26 Aug 2003 03:03:50 +0000 |
| Subject: | Re: Problems to insert with REFERENS in database | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7408@lists.php.net to get a copy of this message | ||
You may have to tweak the big list in the generator.php to make it recognize serial and referencs as a 'key' column.
what database is this?
- is testing for serial a reliable way to detect a primary key?
- for the Login table - I'd suggest creating the method
function keys() {
return array('CodClients');
}
this overrides any ini settings..
- see the comments in the head of DataObject.php
- NOTE this method changed from _get_keys() in DataObject 1.2
Regards
Alan
Binhara wrote:
Hello All. . I work with the DBDataObject.. but i have a problems with referens in database for example.. I have 2 table (objects) like: ---------------------| Cliente |--------------------- | CodCliente serial | | name varchar(40) | | email varchar(40) | ---------------------- -------------------------------------| Login |------------------------------------- | CodCliente referencs cliente(codcliente) | Login varchar (20) | pass varchar (20) -------------------------------------- When a make insert in table login .. it dont put a codcliente from cliente table in codcliente field of table login. It generate a new cod from sequence.. CodCliente in if i use ignore_sequence_keys = ALL then i can insert a recorde in table cliente.. That's Happen .. ??