我得到這個錯誤Warning: mysql_num_rows() expects parameter
1是資源,布爾在我的代碼給出低於 給出這行if(mysql_num_rows($res)>0){
請幫我警告:mysql_num_rows()預計參數1是資源,布爾在
function getProgramFee(){
$sql = "SELECT program_merchantid,program_id,program_fee,program_value,program_type FROM partners_program";
$res = @mysql_query($sql);
if(mysql_num_rows($res)>0){
while($row = mysql_fetch_object($res)){
$merid = $row->program_merchantid;
$id = $row->program_id;
$prgm_fee = trim($row->program_fee);
$prgm_value = $row->program_value;
$prgm_type = $row->program_type;
if(($prgm_type == "0")){
$prgm_fee = $program_fee;
$prgm_value = $program_value;
$prgm_type = $program_type;
}
此代碼是新代碼還是舊代碼? –
sir is affiliate site code http://gala-travel.com/在這裏檢查sir –
這是什麼語言?你是否檢查過「$ res」中的內容? –