Skip to content
WJunction - Webmaster Forum

mysql duplicate entry error show

Status
Not open for further replies.
i have problem i have show error on my site
Duplicate entry 'some tag' for key #
its change every reffesh page. i want its not show ignor it..
i use this mysql coomand in my php code
for insert
PHP:
$remote_ip = $_SERVER['REMOTE_ADDR']; 
mysql_query("INSERT IGNORE INTO search (tag, ip_address) VALUES ('$query', '$remote_ip')");

and for select


PHP:
$query1 = "SELECT `tag` FROM  `search` ORDER BY RAND() LIMIT 10"; 
$query1 = mysql_query($query1);


 

9 comments

Status
Not open for further replies.

About the author

B
Active Member · Joined
249
Messages
13
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom