[RSS Feed/News] first add on to show result of a simple query

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hi, I'm trying to write my first add on to implement some queries in my board.

So I used the cmd.php to create a new addon mediabasar/dealstats. Inside the dealstats folder there are two files, addon.json and stats.php.

stats.php looks as the following:
PHP:

Code:
<?php


namespace mediabasar\dealstats;
$db = \XF::db();

use XF\Mvc\Entity\Entity;

class extension
{

$totaldeals = $this->db()->fetchAll("
            SELECT count(listing_id) as anzahl
            FROM xf_z61_classifieds_listing...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom