I have a table with only one Field ID type Serial Autonumeric and is a PK,
i want insert a new record but it show me error Not null violation, but if
i put a value the first INSERT work correctly but the next Insert it Show
me error Unique violation,
So i try adding a new field in this table
im using Yii Framework, How i can Put VALUES (DEFAULT) if i put "DEFAULT"
is like a string
2013/10/31 Adrian Klaver
> On 10/31/2013 07:31 AM, Yostin Vargas wrote:
>
>>
>> I have a table with only one Field ID type Serial Autonumeric and is a
>> PK, i want
| 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
> On 10/31/2013 07:55 AM, Yostin Vargas wrote:
>
yes i can put other field for identifier , but i think that whit the name
of the table i can know it
2013/10/31 David Johnston
> Adrian Klaver-3 wrote
> >> Table1
> >> Column | Type| Modifiers
> >>
> --+---__+---
i really dont need a number generator, only a unique PK. but i want that
this PK be generate automatically
for example i have a Category calling Computer in English but i have the
same Category in Spanish (Computadora) i assigned the ID->1 for both
So if i put the Pk ID in the table2 number i h