This topic is locked

error on inline add

3/23/2012 10:23:31 AM
PHPRunner General questions
swami author

hello i am getting error when i add inline " Duplicate entry '4' for key 1 " what can be reason?

thanks for support.

Sergey Kornilov admin 3/23/2012

The reason is that you trying to insert a duplicate value into a field that doesn't allow that i.e. into autoincrement field.

C
cgphp 3/23/2012

This happens if the primary key is not unique in your table. Make sure your primary key is AUTOINCREMENT.

swami author 3/23/2012



This happens if the primary key is not unique in your table. Make sure your primary key is AUTOINCREMENT.


yes it is AUTOINCREMENT. but as i look in AdminMysql.. it shows only one value .. and i am able to insert there but not from PHPRunner ..

swami author 3/23/2012



This happens if the primary key is not unique in your table. Make sure your primary key is AUTOINCREMENT.


yes it is AUTOINCREMENT. but as i look in AdminMysql.. it shows only one value .. and i am able to insert there but not from PHPRunner ..

Sergey Kornilov admin 3/23/2012

If this table is a part of Master-Details or you have Advanced Security setup - make sure you are not using autoincrement field as OwnerID or as Link field in the details table.

swami author 3/23/2012



If this table is a part of Master-Details or you have Advanced Security setup - make sure you are not using autoincrement field as OwnerID or as Link field in the details table.


yes i found the cause is this Advanced Security setup.. once i take off this ... it works fine , but now everybody can view data of other , so how it is possible to allow only user able to only their data not others ?

Sergey Kornilov admin 3/23/2012

You need to add one more field to this table and make it OwnerID field in Advanced Security setup. This is it.

swami author 3/23/2012



You need to add one more field to this table and make it OwnerID field in Advanced Security setup. This is it.


Hi Sergey Kornilov

still not able to do... either it totally not available or user can see everybody other user data .. !!

i have 3 table .. 2nd table is relationship to 1st one(login table) .. the one table which i am trying is the 3rd one which has relationship to 2nd one only.
so is that give you some clue what i am trying to get .. thanks for your support.
by the way your product is really one of the best and i am enjoying and having fun to learning. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=65203&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />