1 頁 (共 1 頁)

多重主鍵,若某些鍵值沒值會造成Record無法叫出資料

發表於 : 2004-04-15 18:09:16
yehlu
這個需自行修改一下程式碼
範例如下:
找到 Record 的 show 函數
做下列的修改

// if( !strlen($pf1) || !strlen($pf2) || !strlen($pf3)) $bPK = false;
$bPK = true;
if($pf<>""){
$sWhere .= "f1=" . tosql($pf1, "Text");
}
if($pf2<>""){
if($sWhere != "") $sWhere .= " and ";
$sWhere .= "f2=" . tosql($pf2, "Text");
}
if($pf3<>""){
if($sWhere != "") $sWhere .= " and ";
$sWhere .= "f3=" . tosql($pf3, "Text");
}