Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manipulating bb_option


  • thierry_huet
    Member

    @thierry_huet

    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

    @ashfame

    // For retrieval

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

    // For Saving

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


    Ashfame
    Participant

    @ashfame

    // For retrieval

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

    // For Saving

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


    thierry_huet
    Member

    @thierry_huet

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


    thierry_huet
    Member

    @thierry_huet

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


    Ashfame
    Participant

    @ashfame

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


    Ashfame
    Participant

    @ashfame

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


    thierry_huet
    Member

    @thierry_huet

    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

    @thierry_huet

    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

    @ashfame

    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

    @ashfame

    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

    @thierry_huet

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

    th


    thierry_huet
    Member

    @thierry_huet

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

    th


    Ashfame
    Participant

    @ashfame

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


    Ashfame
    Participant

    @ashfame

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


    thierry_huet
    Member

    @thierry_huet

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


    thierry_huet
    Member

    @thierry_huet

    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