コード例 #1
0
ファイル: model.php プロジェクト: MagnetoTruck/FrameWorkBueno
 function bind($param, $value, $type = null)
 {
     switch ($value) {
         case is_int($value):
             $type = PDO::PARAM_INT;
             break;
         case is_str($value):
             $type = PDO::PARAM_STR;
             break;
         default:
             $type = PDO::PARAM_STR;
             break;
     }
     $this->stmt->bindValue($param, $value, $type);
 }
コード例 #2
0
ファイル: common.php プロジェクト: haitao1880/study
function reqstr($name, $init, $allowempty = FALSE)
{
    $rea = is_str(req($name), $init);
    if (!$allowempty && $rea == '') {
        $rea = $init;
    }
    return $rea;
}