P粉2327937652023-09-04 10:39:04
像这样使用
$imei = $_GET['imei']; $result = $db->query("SELECT * FROM gs_object_data_" . $imei . " LIMIT 200 ");
或
$result = $db->query("SELECT * FROM gs_object_data_{$imei} LIMIT 200 ");
以受保护的方式
$imei = $_GET['imei']; $stmt = $db->prepare("SELECT * FROM gs_object_data_? LIMIT 200"); $stmt->bind_param("s", $imei); $stmt->execute(); $result = $stmt->get_result();