Answer the question
In order to leave comments, you need to log in
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;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question