src/System/Crayner/Database/DB.php
public static function insert($data)
    {
        $self  = self::getInstance();
        $table = $self->table_name;

        if (isset($data[0])) {
            $make      = $self->makeMultipleInsert($table, $data);
            $statement = $make[0];
            $value     = $make[1];
        } else {
            $newData    = $self->makeInsertParameter($data);
            $column     = implode(",", array_keys($data));
            $paramValue = implode(",", array_keys($newData));
            $statement  = "INSERT INTO {$table} ({$column}) VALUES({$paramValue});";
            $value      = $newData;
        }

        $execute   = $self->exec($statement, $value);

        return $execute;
    }
public static function insert($data)
    {
        $self  = self::getInstance();
        $table = $self->table_name;

        if (isset($data[0])) {
            $make      = $self->makeMultipleInsert($table, $data);
            $statement = $make[0];
            $value     = $make[1];
        } else {
            $newData    = $self->makeInsertParameter($data);
            $column     = implode(",", array_keys($data));
            $paramValue = implode(",", array_keys($newData));
            $statement  = "INSERT INTO {$table} ({$column}) VALUES({$paramValue});";
            $value      = $newData;
        }

        $execute   = $self->exec($statement, $value);

        return $execute;
    }
public static function insert ( $ data ) { $ self = self :: getInstance ( ) ; $ table = $ self -> table_name ; if ( isset ( $ data [ 0 ] ) ) { $ make = $ self -> makeMultipleInsert ( $ table , $ data ) ; $ statement = $ make [ 0 ] ; $ value = $ make [ 1 ] ; } else { $ newData = $ self -> makeInsertParameter ( $ data ) ; $ column = implode ( "," , array_keys ( $ data ) ) ; $ paramValue = implode ( "," , array_keys ( $ newData ) ) ; $ statement = "INSERT INTO {$table} ({$column}) VALUES({$paramValue});" ; $ value = $ newData ; } $ execute = $ self -> exec ( $ statement , $ value ) ; return $ execute ; }
Insert & Multiple Insert

@param  array $data
@return boolean
Insert & Multiple Insert