class/PublicWallUpdates.php 1 location
|
@@ 278-285 (lines=8) @@
|
| 275 |
|
* @param int $userid |
| 276 |
|
* @return int |
| 277 |
|
*/ |
| 278 |
|
public function CountMsges($userid) |
| 279 |
|
{ |
| 280 |
|
global $xoopsDB; |
| 281 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 282 |
|
$result = $xoopsDB->queryF($sql); |
| 283 |
|
$sum = $xoopsDB->fetchRow($result); |
| 284 |
|
return $sum[0]; |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
/** |
| 288 |
|
* @Show permaling updates |
class/SwDatabase.php 1 location
|
@@ 481-489 (lines=9) @@
|
| 478 |
|
* @param int $smallworld_com_id |
| 479 |
|
* @return true |
| 480 |
|
*/ |
| 481 |
|
public function deleteWallComment($smallworld_com_id) |
| 482 |
|
{ |
| 483 |
|
global $xoopsDB; |
| 484 |
|
$query = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
| 485 |
|
$result = $xoopsDB->queryF($query); |
| 486 |
|
$query2 = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
| 487 |
|
$result2 = $xoopsDB->queryF($query2); |
| 488 |
|
return true; |
| 489 |
|
} |
| 490 |
|
|
| 491 |
|
/** |
| 492 |
|
* CountUsersRates function |
class/WallUpdates.php 1 location
|
@@ 340-347 (lines=8) @@
|
| 337 |
|
* @param int $userid |
| 338 |
|
* @return int |
| 339 |
|
*/ |
| 340 |
|
public function CountMsges($userid) |
| 341 |
|
{ |
| 342 |
|
global $xoopsDB; |
| 343 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 344 |
|
$result = $xoopsDB->queryF($sql); |
| 345 |
|
$sum = $xoopsDB->fetchRow($result); |
| 346 |
|
return $sum[0]; |
| 347 |
|
} |
| 348 |
|
|
| 349 |
|
/** |
| 350 |
|
* @Show permaling updates |