class/PublicWallUpdates.php 1 location
|
@@ 281-288 (lines=8) @@
|
| 278 |
|
* @param int $userid |
| 279 |
|
* @return int |
| 280 |
|
*/ |
| 281 |
|
public function CountMsges($userid) |
| 282 |
|
{ |
| 283 |
|
global $xoopsDB; |
| 284 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 285 |
|
$result = $xoopsDB->queryF($sql); |
| 286 |
|
$sum = $xoopsDB->fetchRow($result); |
| 287 |
|
|
| 288 |
|
return $sum[0]; |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
/** |
class/SwDatabase.php 1 location
|
@@ 477-485 (lines=9) @@
|
| 474 |
|
* @param int $smallworld_com_id |
| 475 |
|
* @return true |
| 476 |
|
*/ |
| 477 |
|
public function deleteWallComment($smallworld_com_id) |
| 478 |
|
{ |
| 479 |
|
global $xoopsDB; |
| 480 |
|
$query = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
| 481 |
|
$result = $xoopsDB->queryF($query); |
| 482 |
|
$query2 = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_vote') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
| 483 |
|
$result2 = $xoopsDB->queryF($query2); |
| 484 |
|
|
| 485 |
|
return true; |
| 486 |
|
} |
| 487 |
|
|
| 488 |
|
/** |
class/WallUpdates.php 1 location
|
@@ 346-353 (lines=8) @@
|
| 343 |
|
* @param int $userid |
| 344 |
|
* @return int |
| 345 |
|
*/ |
| 346 |
|
public function CountMsges($userid) |
| 347 |
|
{ |
| 348 |
|
global $xoopsDB; |
| 349 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 350 |
|
$result = $xoopsDB->queryF($sql); |
| 351 |
|
$sum = $xoopsDB->fetchRow($result); |
| 352 |
|
|
| 353 |
|
return $sum[0]; |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
/** |