basically i have football league tables set up in my database, each league table has its own db table so on one page i have a dropdown list that. what i want is once one of the leagues are selected it brings up the appropriate league table... so i get this error.. Fatal error: Call to a member function bind_param() on a non-object from this code ..
$sql = "SELECT * FROM ?";
$result = $db->prepare($sql);
$result->bind_param('s',$league_var);
$result->execute();
$result->bind_result(..And the rest of the code..
now what i understand is that the prepare-call fails, so it returns false - false is not an object, so you can't call bind_param() on that... what is it id need to do to be able to select the database from a variable ??