Guest User

Untitled

a guest
Jan 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1.                         function updateOptions($data)
  2.                         {
  3.                 sql::run(
  4.                     " UPDATE `{newsticker_meta}` SET ".
  5.                     " `refreshrate` = '".
  6.                         sql::escape($data['refreshrate'])."',".        
  7.                     " `numitems` = '".
  8.                         sql::escape($data['numitems'])."'".            
  9.                     " WHERE `ID` = '1'");
  10.                 if (sql::affected() == -1) {
  11.                     tooltip::display(
  12.                         sprintf(_("Item couldn't be updated! Error: %s"),
  13.                             sql::error()),
  14.                         TOOLTIP_ERROR);
  15.                     return false;
  16.                 } else {
  17.                 tooltip::display(
  18.                     _("Item has been successfully updated."),
  19.                     TOOLTIP_SUCCESS);
  20.                                 }
  21.                
  22.                 return true;
  23.                         }
Add Comment
Please, Sign In to add comment