countで数える。
0かどうかで分岐させる。
$sql = sprintf(‘SELECT count(ID) as IDCount,Type FROM imgs WHERE ID = “%s”‘
,$ID
);
$recordSet = mysql_query($sql) or die(mysql_error());
$Data = mysql_fetch_assoc($recordSet);
if($Data[‘IDCount’] != 0){
}
else{}
countで数える。
0かどうかで分岐させる。
$sql = sprintf(‘SELECT count(ID) as IDCount,Type FROM imgs WHERE ID = “%s”‘
,$ID
);
$recordSet = mysql_query($sql) or die(mysql_error());
$Data = mysql_fetch_assoc($recordSet);
if($Data[‘IDCount’] != 0){
}
else{}