I have a SQL Query that uses MySQL database to get information from. The table names are first constant with a different IMEI number as it's end.
gs_object_data_12345678
The 12345678 is identified as $_GET
in my script but when I try change table name it does not show the data in that table
$imei = $_GET['imei'];
$result = $db->query("SELECT * FROM gs_object_data_'$imei' LIMIT 200 ");
If I use the string as below it works
$result = $db->query("SELECT * FROM gs_object_data_12345678 LIMIT 200 ");
I need to change the table name with the $_GET
information
The URL alarm_action.php?id=58543®=****&imei=862202228007105
has IMEI in it so the information should pull thru