Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DBI::getInstance()->reconnect($host, $user, $pass, "hw_db");
- $states = new STH("SELECT * FROM tech_settings_state");
- $sth_count = new STH();
- $sth_count->prepare("SELECT count(id) AS count, regions.description region_desc FROM hw_manager hw_ma J
- OIN tech_settings_regions regions ON regions.region=hw_ma.region WHERE hw_status=? GROUP BY hw_ma.region");
- $center.="<table class=\"statistic_table\">
- <tr class=\"header_tr\">
- <td>Статус</td>
- <td>Регион</td>
- <td>Количество</td>
- </tr>";
- while($state_row = $states->fetch_assoc()) {
- $sth_count->q_prepared($state_row['state']);
- while ($count_info = $sth_count->fetch_assoc()) {
- $center.="<tr><td>"
- .$state_row['description']."
- </td>";
- $center.="<td>
- ".$count_info['region_desc']."
- </td>
- <td>
- ".$count_info['count']."
- </td></tr>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement