feel free to keep it strictly simple...

simple_query

Executes a simple query to the database, without returning a query-result.

If you are in the need go get an query-result use execute_query instead.

The method accepts a second param for binding values via a giv

  1. $database->simple_query(
  2. "UPDATE `".TABLE_PREFIX."mod_your_module` SET `content`= ? WHERE `section_id`=?",
  3. array(
  4. $content,
  5. $section_id
  6. )
  7. );
last edit: 03. Nov 2018 CET 17:04:02

You can also pas a two-dimensional array to "set up" more than one set of values

$database->simple_query(
  "INSERT INTO `".TABLE_PREFIX ."mod_droplets_settings` (`id`, `attribute`, `value`) VALUES( ?, ?, ?)",
  array(
    array(1, 'Manage_backups', '1'),
    array(2, 'Import_droplets', '1'),
    array(3, 'Delete_droplets', '1'),
    array(4, 'Add_droplets', '1'),
    array(5, 'Export_droplets', '1'),
    array(6, 'Modify_droplets', '1'),
    array(7, 'Manage_perms', '1')
  )
);

last edit: 23. Mar 2017 CET 20:38:26