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

回覆文章
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

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

文章 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");
}
回覆文章

回到「CodeCharge」