@@ 1874-1883 (lines=10) @@ | ||
1871 | * @param string $table |
|
1872 | * @return array |
|
1873 | */ |
|
1874 | public function getFieldDefinition($fieldname, $table) |
|
1875 | { |
|
1876 | global $xoopsDB; |
|
1877 | $result = $xoopsDB->queryF("SHOW COLUMNS FROM $table LIKE '$fieldname'"); |
|
1878 | if ($result) { |
|
1879 | return $xoopsDB->fetchArray($result); |
|
1880 | } |
|
1881 | ||
1882 | return ''; |
|
1883 | } |
|
1884 | ||
1885 | /** |
|
1886 | * Add a field to a mysql table |
@@ 2017-2026 (lines=10) @@ | ||
2014 | * @param string $table |
|
2015 | * @return array |
|
2016 | */ |
|
2017 | public static function getFieldDefinition($fieldname, $table) |
|
2018 | { |
|
2019 | global $xoopsDB; |
|
2020 | $result = $xoopsDB->queryF("SHOW COLUMNS FROM $table LIKE '$fieldname'"); |
|
2021 | if ($result) { |
|
2022 | return $xoopsDB->fetchArray($result); |
|
2023 | } |
|
2024 | ||
2025 | return ''; |
|
2026 | } |
|
2027 | ||
2028 | /** |
|
2029 | * Add a field to a mysql table |