S
S
Stacy None2019-06-23 20:21:54
PHP
Stacy None, 2019-06-23 20:21:54

How to create a query to the database and display the value of a specific tag in html?

PHP is weak, but I'm starting to understand something)
There is such a query to the database:

$buff = '';
        $db->query( "SELECT * FROM " . USERPREFIX . "_billing_history" . ( count($params) ? 'WHERE ' . implode(' and ', $params) : '') . "
                        ORDER BY {$sort} {$sort_by} LIMIT {$limit}" );
        while ( $row = $db->get_row() )
        {
            $buff = $tpl;
            $buff = str_replace("{date}", langdate('d.m.Y', $row['history_date']), $buff);
            $buff = str_replace("{time}", langdate('H:i', $row['history_date']), $buff);
      $buff = str_replace("{comment}", $row['history_text'], $buff);
            $buff = str_replace("{comment_shot}", strip_tags($row['history_text']), $buff);
      $buff = str_replace("{plugin}", $row['history_plugin'], $buff);
      $buff = str_replace("{plugin.id}", $row['history_plugin_id'], $buff);
            $buff = str_replace("{user}", $row['history_user_name'], $buff);
      $buff = str_replace("{user_urlencode}", urlencode($row['history_user_name']), $buff);
      $buff = str_replace("{sum}", $row['history_plus']	? "<font color=\"anal\">+{$row['history_plus']} {$row['history_currency']}</font>"
                                    : "<font color=\"red\" id=\"net1\">-{$row['history_minus']} {$row['history_currency']}</font>", $buff);
            $widjet .= $buff;
        }

He, from the _billing_history base, displays all sorts of values. And I need to make a request and a tag to display a response that would display exactly the number of records in this _billing_history database. Ie For example: "Total records {zapisi}" and the tag displays the number of records in this database.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question