I have two tables with the same id. How I can take two tables from the same string. I have tried this but doesn't work. I need it to use the data from both tables on the same page
I have tried also this $sql = "SELECT vm_users.*, vm_menu.* FROM vm_users , vm_menu WHERE id = ? ";
$id = $decoded["id"];
$id_user_type = $decoded["id_user_type"];
$sql = "SELECT * FROM vm_users, vm_menu WHERE id = ? ";
$mysqli->set_charset("utf8");
$statement = $mysqli->prepare($sql);
$statement->bind_param('i', $id );
$statement->execute();
$result = $statement->get_result();
$user = $result->fetch_array(MYSQLI_ASSOC);
now I have this error
Fatal error: Uncaught Error: Call to a member function bind_param() on bool in /web/htdocs/home/view/top_pannello_personale.php:18 Stack trace: #0 /web/htdocs/home/gestione_menu.php(1): require() #1 {main} thrown in /web/home/view/top_pannello_personale.php on line 18