SELECT
(SELECT COUNT( `State`) FROM `table3`
WHERE `State` = '0') AS `count_State`,
(SELECT COUNT( `State_J`) FROM `table3`
WHERE `State_J` = '0') AS `count_State_J`,
(SELECT COUNT( `ssh_state`) FROM `table3`
WHERE `ssh_state` = '0') AS `count_ssh_state`,
(SELECT COUNT( `ssh_state_J`) FROM `table3`
WHERE `ssh_state_J` = '0') AS `count_ssh_state_J`,
(SELECT COUNT( * ) FROM `table3`) AS `count`
$curdate = '';
while (($row = $result_set -> fetch_assoc()) != false) {
$date = sdate("M Y", 0, $row["date"]);
if ($curdate != $date) {
echo "<h2>Отчетность за ".sdate("M Y", 0, $row["date"])."</h2>";
$curdate = $date;
}
echo "<a href=\"".$row["link"]."\">".$row["name"]."</a>";
echo "<span>(".fdate("d M Y h:i", 0, $row["date"]).")</span><hr>";
}
<?php
$json = file_get_contents('730.json');
$result = array();
$data = json_decode($json, true);
foreach ($data as $name => $value) {
$result[] = array("market_hash_name" => $name,
"price" => array_shift(array_pop($value)));
}
file_put_contents('opskins.json', json_encode(array("prices" => $result)));
?>
http-URI = "http:" "//" authority path-abempty [ "?" query ]
[ "#" fragment ]
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
ALPHA := [A-Za-z]
DIGIT := [0-9]
HEXDIG := [0-9A-F]