mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-23 19:45:10 +01:00
d'oh!
git-svn-id: file:///svn/phpbb/trunk@7858 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
020debce66
commit
4fa1a7c827
@ -965,19 +965,19 @@ function column_exists($dbms, $table, $column_name)
|
||||
WHERE type = 'table'
|
||||
AND name = '{$table}'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
||||
|
||||
$cols = trim($matches[1]);
|
||||
$col_array = preg_split('/,(?![\s\w]+\))/m', $cols);
|
||||
$column_list = array();
|
||||
|
||||
foreach ($col_array as $declaration)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user