I have been working on this problem for a few days.
When I write data into a sql database, the results are duplicate listings:
PHP Code:
<?php
session_start() ;
$dbh=mysql_conn ect ("localhost" , "username", "password") or die ('Cannot
connect to the database: ' . mysql_error());
mysql_select_db ("database name") or die ("Cannot locate database:
".mysql_error() );
mysql_query("IN SERT INTO tablename (website) Values('website _es')");
echo "Data Transfer Complete";
?>
After emptying the table and running the PHP script:
The results in the database:
id website
130 website_es
131 website_es
As you can see, I have been working on this for some time, id=131.
Any suggestions for stopping the insertion of the duplicate rows?
Thanks.
Ken
When I write data into a sql database, the results are duplicate listings:
PHP Code:
<?php
session_start() ;
$dbh=mysql_conn ect ("localhost" , "username", "password") or die ('Cannot
connect to the database: ' . mysql_error());
mysql_select_db ("database name") or die ("Cannot locate database:
".mysql_error() );
mysql_query("IN SERT INTO tablename (website) Values('website _es')");
echo "Data Transfer Complete";
?>
After emptying the table and running the PHP script:
The results in the database:
id website
130 website_es
131 website_es
As you can see, I have been working on this for some time, id=131.
Any suggestions for stopping the insertion of the duplicate rows?
Thanks.
Ken
Comment