Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manipulating bb_option

  • @thierry_huet

    Member

    Hi all,

    I have a little problem I’m sure someone got and solved. In th admin part, I want to manage data in bb_meta table. I saw a, ‘object_id’ column. How to change the value on it ? How to create a new value ? bb_update_option allow us to add or update a new val in meta_key column but what is the most appropriate function ?

    Thanks

    th

Viewing 16 replies - 1 through 16 (of 16 total)
  • @ashfame

    Participant

    // For retrieval

    $data = bb_get_option(‘option-name’);

    // For Saving

    bb_update_option(‘option-name’,$data);

    @ashfame

    Participant

    // For retrieval

    $data = bb_get_option(‘option-name’);

    // For Saving

    bb_update_option(‘option-name’,$data);

    @thierry_huet

    Member

    Thank you for replying but what about the object_id ? do you have any idea ?

    @thierry_huet

    Member

    Thank you for replying but what about the object_id ? do you have any idea ?

    @ashfame

    Participant

    Describing what are you trying to do will help me explaining it better. :)

    @ashfame

    Participant

    Describing what are you trying to do will help me explaining it better. :)

    @thierry_huet

    Member

    A a matter of fact, I want to manage different set of options ie

    1 => (keyword => ‘aaa’, name =>’bbb’)

    2 => (keyword => ‘xxx’, name => ‘yyy’)

    With bb_option, we can register ‘aaa’ and ‘bbb’ or ‘xxx’ and ‘yyy’. With object_id, we can register both.

    With this info, I want to put on the admin config a select box, Choosing 1 or 2 to show related options and have the possibility to save them.

    (I hope my description is clear)

    th

    @thierry_huet

    Member

    A a matter of fact, I want to manage different set of options ie

    1 => (keyword => ‘aaa’, name =>’bbb’)

    2 => (keyword => ‘xxx’, name => ‘yyy’)

    With bb_option, we can register ‘aaa’ and ‘bbb’ or ‘xxx’ and ‘yyy’. With object_id, we can register both.

    With this info, I want to put on the admin config a select box, Choosing 1 or 2 to show related options and have the possibility to save them.

    (I hope my description is clear)

    th

    @ashfame

    Participant

    why don’t you just make an array and save it

    // For retrieval
    $array = bb_get_option('option-name');

    // For Saving
    bb_update_option('option-name',$array);

    @ashfame

    Participant

    why don’t you just make an array and save it

    // For retrieval
    $array = bb_get_option('option-name');

    // For Saving
    bb_update_option('option-name',$array);

    @thierry_huet

    Member

    Because I have to save $array[1], $array[2] for on option. But maybe by exploding… I’ll try that.

    th

    @thierry_huet

    Member

    Because I have to save $array[1], $array[2] for on option. But maybe by exploding… I’ll try that.

    th

    @ashfame

    Participant

    just make an array and save it as if it was a variable, APIs would handle its serialization and everything.

    @ashfame

    Participant

    just make an array and save it as if it was a variable, APIs would handle its serialization and everything.

    @thierry_huet

    Member

    Ah yes … I’ll try that. Thanks. I’ll close the discussion after benchmarking and sending you feedback.

    @thierry_huet

    Member

    Ah yes … I’ll try that. Thanks. I’ll close the discussion after benchmarking and sending you feedback.

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.
Skip to toolbar