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