我正在尝试使用 PHP。这是我的 func.php
function returnBlankStylist(){
$sql=mysql_query("SELECT * FROM `".$dbn."`.`stylist` WHERE `stylist`.`customer_id`='1'");
if (mysql_affected_rows()==0) {
return false;
} else {
return true;
}
}
这是我的页面.tpl
<?php if (returnBlankStylist==false){?>
<div class="center graybox"> Please enjoy this discount since this you have never filled out a query before</div>
<? }?>
如果客户 ID 1 存在,则显示消息,如果客户 ID 1 不存在,则显示消息?