Here is the example :
This is the query in Add function :
PHP Code:
$query = "insert into $this->table_name
(name, parent_id, description, image, content, visible, links, permission, meta_keyword, meta_description, registered_only)
values ('$name', $parent_id, '$description', '$image', '$content', $visible, 0, $permission, '$meta_keyword', '$meta_description', $registered_only)";
If you add fields myfield1,myfield2 then it will be :
PHP Code:
$query = "insert into $this->table_name
(name, parent_id, description, image, content, visible, links, permission, meta_keyword, meta_description, registered_only,myfield1,myfield2)
values ('$name', $parent_id, '$description', '$image', '$content', $visible, 0, $permission, '$meta_keyword', '$meta_description', $registered_only, '$myfield1', '$myfield2')";
And the function parameters will be :
PHP Code:
function Add($name, $parent_id, $description, $image, $content, $visible, $permission, $meta_keyword, $meta_description, $registered_only, $myfield1, $myfield2)
Btw, you should add the fields in idx_category first.