Re: Table with Field Serial - Problem
От | Yostin Vargas |
---|---|
Тема | Re: Table with Field Serial - Problem |
Дата | |
Msg-id | CAPMdYjAAFOXOsF=2CNTtbO=YPhz3QkyhxgX-1O1WhzVoTRFwaQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Table with Field Serial - Problem (Adrian Klaver <adrian.klaver@gmail.com>) |
Ответы |
Re: Table with Field Serial - Problem
|
Список | pgsql-general |
Yes i have a single field because is related to another table that contains, the name
it's for to do multilanguage
Example
Table1
Column | Type | Modifiers
----------+-------------------+-------------------------------------------------------------
id | integer | not null default nextval('test_table_id_fld_seq'::regclass)
----------+-------------------+-------------------------------------------------------------
id | integer | not null default nextval('test_table_id_fld_seq'::regclass)
Table2
Column | Type | related
----------+-------------------+-------------------------------------------------------------
id_table1 | integer | FK of Table1.id
Column | Type | related
----------+-------------------+-------------------------------------------------------------
id_table1 | integer | FK of Table1.id
id_lang | integer | FK of lang.id
name | varchar
I solve it doin it " $model->id=new CDbExpression('DEFAULT'); "
Thanks for your Helps
2013/10/31 Adrian Klaver <adrian.klaver@gmail.com>
On 10/31/2013 07:55 AM, Yostin Vargas wrote:My table is like this----------+-------------------__+-----------------------------__------------------------------__--
Column | Type | Modifiersnextval('test_table_id_fld___seq'::regclass)
id_fld | integer | not null default
So you have a single field table, what is the purpose?That would seem to be a question for the Yii mailing list/forum.
im using Yii Framework, How i can Put VALUES (DEFAULT) if i put
"DEFAULT" is like a string
--
Adrian Klaver
adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: