1
Now we dont have any function/class in xoops to do alter/change/show functionality on database.
i suggest to add some of them ASAP in xoops 26 like this:
le="color: #000000"><?php public function changeField($field = null, $structure = null) { $sql = "ALTER TABLE {$this->table} CHANGE {$field} {$field} {$structure}"; if (!$result = $this->db->queryF($sql)) { xoops_error($this->db->error().'<br />'.$sql); return false; } return true; } public function showFields($field = null) { $sql = "SHOW FIELDS FROM {$this->table}"; if (isset($field)) { $sql .= " LIKE '{$field}'"; } if (!$result = $this->db->queryF($sql)) { xoops_error($this->db->error().'<br />'.$sql); return false; } $ret = array(); while ($myrow = $this->db->fetchArray($result)) { $ret[$myrow["Field"]] = $myrow; } return $ret; }
do you think it needs more functionality eg: WHERE
please discuss then we can add it to sf.net feature request.