You are here

function bueditor_query_buttons in BUEditor 7

Same name and namespace in other branches
  1. 6.2 bueditor.inc \bueditor_query_buttons()

Fetch buttons by an sql query.

2 calls to bueditor_query_buttons()
bueditor_buttons in ./bueditor.inc
All buttons of an editor.
bueditor_buttons_by_id in admin/bueditor.admin.inc
Load buttons by ids.

File

./bueditor.inc, line 35
Implements commonly used functions for bueditor.

Code

function bueditor_query_buttons($sql, $var = array()) {
  $buttons = array();
  $result = db_query($sql, $var);
  foreach ($result as $button) {
    $buttons[$button->bid] = $button;
  }
  return $buttons;
}