Difficult to say without a lot more information but you may wish to consider how your primary key is set.
Is your primary key an autoincrement integer that is automatically assigned or is it a manually entered value.
Look at the strange behaviour and think whether this may be an issue.
You may also look at the url to see what variables are being passed e.g.
www.mypage.php?var1=x
This might give you a clue to CCS looking for values that are not there because you entered them manually via PhpMyAdmin and not through your web app.
Good luck and happy hunting!