Mysql is automaticlly creating an extra row when a data is inserted

ikunal

New Member
I am trying to create an article based website using codeigniter. When any article is requested to fetch from database for viewing, I use the following code to mark the number of unique view of each article in a separate table called "hits". \[code\]mysql_query("INSERT INTO hits(ip,article_slug,hitcount) VALUES('$ip_address','$id',1) ON DUPLICATE KEY UPDATE hitcount=hitcount+0");\[/code\]I get the value of article_slug from \[code\]$this->uri->segment(3);\[/code\]Now the above query works fine but the problem is, in the database it adds one extra row for each unique article view and I have no idea where it is coming from. the table looks like thisTable: hits\[code\] ip article_slug hitcount 127.0.0.1 valid.png //<<no idea where the valid.png comes from 1 127.0.0.1 making-a-seo-friendly-url-for-a-cms 1\[/code\]I am running it on localhost.Could you tell me how to get rid of creation of the extra row that is producing valid.png Thanks in Advance :)
 
Back
Top