public function getInsertGenericSql(array $cols)
    {
        $sql = ['insert into', "`{$this->getTableNameLazy()}`", '('];
        $sqlCols = [];
        foreach ($cols as $col) {
            $sqlCols[] = "`$col`";
        }
        $sql[] = implode(', ', $sqlCols);
        $sql[] = ') values (';
        $sqlCols = [];
        foreach ($cols as $col) {
            $sqlCols[] = ":$col";
        }
        $sql[] = implode(', ', $sqlCols);
        $sql[] = ')';
        return implode(' ', $sql);
    }
public function getInsertGenericSql(array $cols)
    {
        $sql = ['insert into', "`{$this->getTableNameLazy()}`", '('];
        $sqlCols = [];
        foreach ($cols as $col) {
            $sqlCols[] = "`$col`";
        }
        $sql[] = implode(', ', $sqlCols);
        $sql[] = ') values (';
        $sqlCols = [];
        foreach ($cols as $col) {
            $sqlCols[] = ":$col";
        }
        $sql[] = implode(', ', $sqlCols);
        $sql[] = ')';
        return implode(' ', $sql);
    }
public function getInsertGenericSql ( array $ cols ) { $ sql = [ 'insert into' , "`{$this->getTableNameLazy()}`" , '(' ] ; $ sqlCols = [ ] ; foreach ( $ cols as $ col ) { $ sqlCols [ ] = "`$col`" ; } $ sql [ ] = implode ( ', ' , $ sqlCols ) ; $ sql [ ] = ') values (' ; $ sqlCols = [ ] ; foreach ( $ cols as $ col ) { $ sqlCols [ ] = ":$col" ; } $ sql [ ] = implode ( ', ' , $ sqlCols ) ; $ sql [ ] = ')' ; return implode ( ' ' , $ sql ) ; }
builds insert statement using cols provided
@param  array  $cols 'name', 'another'
@return string       built insert sql
builds insert statement using cols provided