[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-15 Thread R.Smith
On 2015-09-14 09:04 PM, Petr L?z?ovsk? wrote: > Have following table: > > CREATE TABLE ip_addr > ( > /*! Person identificator (PID) %%a */ pid INTEGER PRIMARY KEY NOT NULL, > /*! IP address %%b */ ip_addr VARCHAR (16) NOT NULL, > /*! Status: 0 - Allowed, Unassigned to specific customer (blocked)

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-15 Thread Petr Lázňovský
Thay track all of us and "optimalise" search results. My list of links could differ from yours. I have googled key phrase '"UNIQUE constraint failed:" sqlite primary key' and similar, but not read whole received documents, perform only brief look on it. This is best practice by my experience,

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Martin Engelschalk
Hi Petr, if you Google for "database table primary key" the first few results lead to quite good explanations. Also, the english wikipedia's article "Unique key" explains primary keys. HTH Martin Am 14.09.2015 22:25 schrieb Petr L?z?ovsk? : > > I had googled to verify such idea before, but

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Petr Lázňovský
I had googled to verify such idea before, but have no luck. Thanks, L. > Hello Petr, > defining the column pid as INTEGER PRIMARY KEY you added an implicit > contraint; a primary key means that only one record with a given value > of pid can exist in the table. > See

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Martin Engelschalk
Hello Petr, defining the column pid as INTEGER PRIMARY KEY you added an implicit contraint; a primary key means that only one record with a given value of pid can exist in the table. See https://www.sqlite.org/lang_createtable.html#rowid Martin Am 14.09.2015 um 21:04 schrieb Petr L?z?ovsk?: >

[sqlite] UNIQUE constraint failed: ip_addr.pid

2015-09-14 Thread Petr Lázňovský
Have following table: CREATE TABLE ip_addr ( /*! Person identificator (PID) %%a */ pid INTEGER PRIMARY KEY NOT NULL, /*! IP address %%b */ ip_addr VARCHAR (16) NOT NULL, /*! Status: 0 - Allowed, Unassigned to specific customer (blocked) */ /*! Status: 1 - Allowed, Asigned to concrete customer */