View | Details | Raw Unified | Return to bug 22159
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (-1 / +21 lines)
Lines 17280-17285 sub TableExists { Link Here
17280
    return 0;
17280
    return 0;
17281
}
17281
}
17282
17282
17283
=head2 ColumnExists( $table, $column )
17284
17285
=cut
17286
17287
sub ColumnExists {
17288
    my ( $table, $column ) = @_;
17289
17290
    my $database = C4::Context->config("database");
17291
17292
    my $sth = $dbh->prepare(qq{
17293
        SELECT * FROM INFORMATION_SCHEMA.COLUMNS
17294
        WHERE
17295
            TABLE_SCHEMA='$database'  AND
17296
            TABLE_NAME='$table' AND
17297
            COLUMN_NAME='$column';
17298
    });
17299
    $sth->execute;
17300
17301
    return ($sth->fetchrow_hashref) ? 1 : 0;
17302
}
17303
17283
=head2 DropAllForeignKeys($table)
17304
=head2 DropAllForeignKeys($table)
17284
17305
17285
Drop all foreign keys of the table $table
17306
Drop all foreign keys of the table $table
17286
- 

Return to bug 22159