I am trying to create dynamic code ready from any table with a specific name, but the difference between each table name is the number that the variable generates: for example:
// the way I get my variable, for example, = 3
$pid = $GLOBALS["localid"];
// table name, for example, tablename_3
$strTable = "tablename_" .$pid;
// here, what the request should look like
$query = "SELECT * FROM . $strTable . where .....;
I am making a mistake somewhere, but I canโt understand, and appreciate a little help.
source share