Jump to content


Recommended Posts

does your field have any unique column or primary key column?

Link to post
Share on other sites

You dont need to send a query(reduce overhead) if you have any PK or unique constraint in your database table. if your database schema wants any unique column you should constraint it from the database. you can directly execute the INSERT, if there is no any duplication it will get inserted. otherwise when it fails it sends error, you check the specific error number using mysql_errno() and you can show any specific custom error on that. you can check list of mysql error number here ==> http://dev.mysql.com...ges-server.htmlhttp://php.net/mysql_errno

Edited by birbal
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...