Friday 15 July 2011

php - SQL copy rows from one table to another but only once -


I am using this line to copy lines from one line to another.

  $ query = "originally select from ID = '$ id' select * 'include; mysql_query ($ query);   

The first time I run this line it works fine, but if I try to redo it then it does not copy that line

Any ideas?

In the above comments "Answer" for future reference, this problem with Ankit Jalani Mick is the primary problem

:

Is there an interrupt when adding another time? Please show an error message. I think the primary key obligation is unsuccessful. < P> See if the primary key or any other constraint is failing to manually enter the database.

ME:

> Mysql_query function failure will be used to stop execution , You should print the error after the query.

  If (MySQL_query ($ query)) Print "MySQL Error:". Mysql_error ();    

No comments:

Post a Comment