I'm trying to use the id I'm getting from the prior sql-statement to fetch the table information for that id, but $query3
always returns FALSE
and I can't seem to figure out. I am connected to the database and I do have the permissions to access this table. The id is also correct in each case.
CODE
global $con;
$query = $con->prepare("SELECT * FROM allTeams WHERE Coach = ?");
$query->bind_param('s',$username);
$query->execute();
$query->bind_result($Id,$time,$day,$coach,$hCoach);
$date = date('d-m');
$array = array();
while($row = $query -> fetch())
{
var_dump($Id);
echo "<br />";
$teamId = strval($Id);
$query3 = $con -> query("DESCRIBE `$teamId`");
var_dump($query3);
echo "<br />";
}
OUTPUT
int(1022)
bool(false)
int(1023)
bool(false)
int(2033)
bool(false)