Skip to:
Content
Pages
Categories
Search
Top
Bottom

Manipulating bb_option

  • 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)
  • // For retrieval

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

    // For Saving

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

    // For retrieval

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

    // For Saving

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

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

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

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

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

    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

    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

    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);

    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);

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

    th

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

    th

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

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

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

    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