Merge branch 'ryzom/rites' into main/gingo-test
[ryzomcore.git] / ryzom / server / www / login / libs / domain_info.php
blob0fa7302303c58bc2faa10146a825ed8e77f838bb
1 <?php
3 include_once(dirname(__DIR__).'/../config.php');
5 function getDomainInfo($domainId)
7 global $DBHost, $DBUserName, $DBPassword, $DBName;
9 $link = mysqli_connect($DBHost, $DBUserName, $DBPassword) or die("can't connect to nel db");
10 mysqli_select_db ($link, $DBName) or die("can't select nel db");
12 $domainId = (int)$domainId;
13 $query = "SELECT * FROM domain WHERE domain_id = $domainId";
14 $result = mysqli_query($link, $query) or die("query ($query) failed");
16 if (mysqli_num_rows($result) == 0)
18 die("Can't find row for domain ".$domainId);
21 $domainInfo = mysqli_fetch_array($result);
23 return $domainInfo;