3
You can also look at mypoints plugins.
Here is one example:
function news_useritems_count($uid, $since)
{
global $xoopsDB;
list($ret) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE (uid='$uid' AND published > '$since')"));
return $ret;
}
Since must be a valid timestamp
$since = time() - 24*60*60;
will give last 24 hours (not today).