S
S
strelkovandrey2017-11-28 14:53:31
PHP
strelkovandrey, 2017-11-28 14:53:31

How to make a request to Oracle from PHP?

Good afternoon, I’m completely confused, many examples are everywhere and I can’t decide which one is correct
. From PHP, I connect to MySQL like this:

<?php
$conn = new mysqli("servername", "user", "password", "databasename");

$sql = "SELECT id, firstname, lastname FROM users";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        echo $row["id"] . " " . $row["firstname"] . " " . $row["lastname"] . "<br>";
    }
}
$conn->close();
?>

How a similar example would look like when connecting to Oracle via oci_connect

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krypt3r, 2017-11-28
@krypt3r

Something like this:
There is no way to check now, there is only a config for Yii1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question