Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getUCsNumberByAreaId($id){
- $db = new DB();
- $db->dbConnect();
- $ucs = array();
- $i = 0;
- $sql = "SELECT uc.nome FROM uc, area
- WHERE uc.id_area = area.id
- AND area.id = ".$id.";";
- $result = mysqli_query($db->con, $sql);
- $db->dbClose();
- if ($result->num_rows > 0) {
- while($row = mysqli_fetch_array($result)) {
- $ucs[$i]["nome"] = $row['nome'];
- $i++;
- }
- return $i;
- } else {
- return '0';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement