Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql = "SELECT * FROM _obb_product;";
- $resultSet[] = "";
- $ini = parse_ini_file("settings/config.ini");
- $host = $ini["db_host"];
- $port = $ini["db_port"];
- $user = $ini["db_user"];
- $password = $ini["db_password"];
- $db_name = $ini["db_name"];
- $conn = new mysqli($host, $user, $password, $db_name, $port);
- if (!$conn) {
- echo("Connection failed " . mysqli_connect_error());
- }
- $result = $conn->query($sql);
- // Hvis den finder data
- if ($result->num_rows > 0) {
- while ($object = $result->fetch_object()) {
- $resultSet = $object;
- }
- }
- echo json_encode($resultSet);
- // }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement