class/SwDatabase.php 1 location
|
@@ 431-437 (lines=7) @@
|
428 |
|
* @param int $userID |
429 |
|
* @return bool true on successful update |
430 |
|
*/ |
431 |
|
public function updateComplaint($userID) |
432 |
|
{ |
433 |
|
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smallworld_admin') . ' SET complaint = complaint + 1 ' . "WHERE userid = '" . (int)$userID . "'"; |
434 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
435 |
|
|
436 |
|
return $result ? true : false; |
437 |
|
} |
438 |
|
|
439 |
|
/** |
440 |
|
* updateInspection function |
include/functions.php 1 location
|
@@ 667-673 (lines=7) @@
|
664 |
|
* |
665 |
|
* @return bool |
666 |
|
*/ |
667 |
|
function SmallworldDeleteOldInspects() |
668 |
|
{ |
669 |
|
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smallworld_admin') . " SET inspect_start = '', inspect_stop = '' WHERE (inspect_start+inspect_stop) <= " . time() . ''; |
670 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
671 |
|
|
672 |
|
return ($result) ? true : false; |
673 |
|
} |
674 |
|
|
675 |
|
/** |
676 |
|
* Function to get sum of users in your following array |