Search Postgresql Archives

Re: Table with Field Serial - Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/31/2013 08:23 AM, Yostin Vargas wrote:
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)


Table2
Column  |       Type        |                      related
----------+-------------------__+-----------------------------__------------------------------__--
  id_table1   | integer           |  FK of Table1.id
  id_lang       | integer          |  FK of lang.id <http://lang.id>
  name         |  varchar


I may be having one of my dumb moments, but what does the above accomplish that including the serial column in Table2 does not?


I solve it  doin it  " $model->id=new CDbExpression('DEFAULT'); "

Great.


Thanks for your Helps



--
Adrian Klaver
adrian.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux