コード例 #1
0
ファイル: mom.php プロジェクト: r67/masomatic
 public static function delete($name, $array)
 {
     $sql = "delete FROM " . $name;
     if ($array) {
         $first = true;
         $sql .= " where ";
         foreach ($array as $key => $value) {
             if (!$first) {
                 $sql = " and ";
             } else {
                 $first = false;
             }
             $sql .= $key . "='" . $value . "' ";
         }
     }
     LOG::trace("sql:{$sql}");
     $ds = new DataSource();
     $result = $ds->query($sql);
     if (!is_numeric($result)) {
         if ($ds->error()) {
             throw new Exception($ds->error());
         }
     }
     return $result;
 }
コード例 #2
0
ファイル: mom-util.php プロジェクト: r67/masomatic
 static function ass($val)
 {
     LOG::trace("value:" . print_r($val, true));
 }