1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-23 19:45:10 +01:00
git-svn-id: file:///svn/phpbb/trunk@7858 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2007-07-10 03:59:08 +00:00
parent 020debce66
commit 4fa1a7c827

View File

@ -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)
{