fix Templates/Build/available.tpl

This commit is contained in:
unknown
2012-10-09 15:14:45 +02:00
parent 58d63dab6d
commit c06f9b869b
2 changed files with 92 additions and 45 deletions
+12
View File
@@ -1868,12 +1868,24 @@ class MYSQL_DB {
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function getBuildingByField2($wid,$field) {
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and field = $field and master = 0";
$result = mysql_query($q, $this->connection);
return mysql_num_rows($result);
}
function getBuildingByType($wid,$type) {
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and type = $type and master = 0";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function getBuildingByType2($wid,$type) {
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and type = $type and master = 0";
$result = mysql_query($q, $this->connection);
return mysql_num_rows($result);
}
function getDorf1Building($wid) {
$q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid and field < 19 and master = 0";