#1 05309
$ip_sql=mysql_query("select ip from musci_ip where musci_id='$id' and ip='$ip'");这上面的代码用speedphp怎么写。我是个小菜鸟,请帮忙下。
$count=mysql_num_rows($ip_sql);
if($count >0 ){//点击记录
echo "喜欢过了";
}else{//更新
$sql = "update musci set love=love+1 where id='$id'";
mysql_query( $sql);
$sql_in = "insert into musci_ip (musci_id,ip,postdate) values ('$id','$ip','$search_postdate')";
mysql_query( $sql_in);
$result = mysql_query("select love from musci where id='$id'");
$row = mysql_fetch_array($result);
$love = $row['love'];
echo $love;
}
2013-01-04 23:16:03