mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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
1 changed files with 3 additions and 3 deletions
|
@ -965,19 +965,19 @@ function column_exists($dbms, $table, $column_name)
|
||||||
WHERE type = 'table'
|
WHERE type = 'table'
|
||||||
AND name = '{$table}'";
|
AND name = '{$table}'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row = $db->sql_fetchrow($result);
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if (!$result)
|
if (!$result)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
preg_match('#\((.*)\)#s', $row['sql'], $matches);
|
||||||
|
|
||||||
$cols = trim($matches[1]);
|
$cols = trim($matches[1]);
|
||||||
$col_array = preg_split('/,(?![\s\w]+\))/m', $cols);
|
$col_array = preg_split('/,(?![\s\w]+\))/m', $cols);
|
||||||
$column_list = array();
|
|
||||||
|
|
||||||
foreach ($col_array as $declaration)
|
foreach ($col_array as $declaration)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue