- $sql = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->fields, $after_field);
+ if (count($this->fields) == 0)
+ {
+ show_error('Field information is required.');
+ }
+
+ $sql = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->fields, $after_field);