<?php

$result = sql_fetch_assoc(sql_query("
    SELECT `COLUMN_NAME`
    FROM `information_schema`.`COLUMNS`
    WHERE (
        `TABLE_SCHEMA`='{$config['dbname']}'
        AND `TABLE_NAME`='{$config['table_prefix']}tips'
        AND `COLUMN_NAME`='auto_repeat'
    )
"));

if (empty($result)) {
    // code ...
} else {
    run_query("
        ALTER TABLE `{$config['table_prefix']}tips`
        DROP `auto_repeat`;
    ");
}
