I'm following a toturial, everything looks the same. My problem is that I can not connect to the table.
connect.php:
<?php
$db = new mysqli('127.0.0.1', 'user', 'pass', 'app');
if ($db -> connect_errno) {
die ('Sorry, we are having some problems.');
}
?>
This works correctly, the connection to the DB is done without probs.
The problem is here:
index.php
<?php
require_once('db/connect.php');
$result = $db->query("SELECT * FROM people") or die ($db->error);
if ($result->num_rows) {
echo 'yay';
}
?>
The query gives this error message being this:
Table 'app.people' does not exist
Being that, only people
is the name of the table