Add a field in _items

Hello

I wish add a field in the table _items. Do you know what is the function that insert datas in the table (INSERT INTO _items…) ?

Many thanks

Olivier

_items is a slightly odd presentation of the name of the items table, but I suppose it would come out that way if your db.ini prefix is configured as _.

The insert_item function is one way to add items, which will add an entry to that table, though there are also other ways.

Hello

I added a new field in MB_items table (my prefix is MB). The name of this field is GBH But when i create a new record (a new item) I have the message Mysqli prepare error: Champ ‘GBH’ unknow in field list
Where the other place i must declare this new field ?

Thanks

Olivier

Hmm I don’t think I noticed before that you wanted to add a field to the table (rather than just a new item to the table).

Modifying the core tables’ columns like this is generally a bad idea and not something we’d be able to offer support for. If you need to store more data, in a plugin for example, the typical way to do that would be to add a separate table for your plugin that references items by their IDs and then can have whatever additional columns you want.

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.