[GENERAL] Table with Field Serial - Problem

2013-10-31 Thread Yostin Vargas
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

Re: [GENERAL] Table with Field Serial - Problem

2013-10-31 Thread Yostin Vargas
Yii Framework, How i can Put VALUES (DEFAULT) if i put DEFAULT is like a string 2013/10/31 Adrian Klaver adrian.kla...@gmail.com 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 insert a new record but it show me

Re: [GENERAL] Table with Field Serial - Problem

2013-10-31 Thread Yostin Vargas
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.kla...@gmail.com On 10/31/2013 07:55 AM, Yostin Vargas wrote: My table is like

Re: [GENERAL] Table with Field Serial - Problem

2013-10-31 Thread Yostin Vargas
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 pol...@yahoo.com Adrian Klaver-3 wrote Table1 Column | Type| Modifiers

Re: [GENERAL] Table with Field Serial - Problem

2013-10-31 Thread Yostin Vargas
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