get_var($strsql); if ($clicks!='') { $clicks = $clicks +1; $strout = $clicks; $strsql = "UPDATE wp_postmeta set meta_value=".$clicks." where meta_key = 'article_clicks' and post_id='".$postid."' "; $wpdb->query($strsql); } else { $strout = "1"; $strsql = "INSERT INTO wp_postmeta(post_id,meta_key,meta_value) VALUES (".$postid.", 'article_clicks', '1') "; $wpdb->query($strsql); } echo $clicks+1; ?>
点击: 次", }, function(data,status){ if (status ==='success'){ $("#views").text(data); }else{ $("#views").text(); } }); " _ue_custom_node_="true">