I've got this and I dont know why its not working.
$sql = $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_url LIKE '%%s'%", $_SERVER['HTTP_REFERER'] );
$row = $wpdb->get_row($sql);
$lid = $row->link_id;
$wpdb->query("UPDATE $wpdb->wptstats SET impressions = impressions+1 WHERE link_id = ".$lid);
Can anyone please help me in the right directions ?
Aucun commentaire:
Enregistrer un commentaire