It is an intermittent error because the routine to tally the outbound click count, as well as update the reports table is not even called if consecutive clicks come from same IP address..
if($REMOTE_ADDR != $get_row["OutIP"]){
so on the first click, the outbound click in the links table is incremented for that site, and as your IP address recorded. but the insert to the reports table fails, and you see the error.
A subsequent click by you would come from the same IP address, so the insert to the reports table is never attempted, and the out bound click sount for that site is not incremented.
This is in place to prevent over zealous web masters from artificially increasing their rank on the what popular page.
Did you try replacing the 2 apostrophes with the word NULL ?
eg;
| Code: |
$sql = "insert into $tb_track values (NULL, '$ID', '$page_desc', '$user_agent', '$ip', '$date_added')";
|