Skip to content
WJunction - Webmaster Forum

mysql duplicate entry error show

Status
Not open for further replies.

Black Tiger

Established Member
249
2011
13
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
Established Member · Joined
249
Messages
13
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom