The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DB.php edits by Faguss
#4
I should have started a more general thread. Instead, I'm repurposing this one. Anyway, there's a new function cell() for getting one field out of the first result. Examples:

Code:
$bio = $db->cell("profiles.bio",1);
Code:
if (isset($bio)) echo $bio;

Code:
$number = $db->cell("users.COUNT(*)",["TIMESTAMPDIFF(DAY,join_date,CURRENT_TIMESTAMP)","<",30]);
Code:
if (!empty($number)) echo "$number new user".($number!=1?"s":"")." recently";
  Reply


Messages In This Thread
DB.php edits by Faguss - by faguss - 06-06-2017, 01:31 PM
DB.php edits by Faguss - by mudmin - 06-06-2017, 07:08 PM
DB.php edits by Faguss - by faguss - 06-22-2017, 05:27 PM
DB.php edits by Faguss - by faguss - 07-14-2017, 11:13 AM
DB.php edits by Faguss - by picassoo - 07-16-2017, 06:58 AM
DB.php edits by Faguss - by faguss - 07-16-2017, 07:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)