Beispiel #1
0
 /**
  * Inserts a table row with specified data.
  * Special handling for PDO_IBM
  * remove empty slots
  *
  * @param mixed $table The table to insert data into.
  * @param array $bind Column-value pairs.
  * @return int The number of affected rows.
  */
 public function insert($table, array $bind)
 {
     $this->_connect();
     $newbind = array();
     if (is_array($bind)) {
         foreach ($bind as $name => $value) {
             if ($value !== null) {
                 $newbind[$name] = $value;
             }
         }
     }
     return parent::insert($table, $newbind);
 }