标签: php sql pdo prepared-statement sql-like
基本上这是我正在使用的代码:
$batch = "XZ"; $query = $db->prepare('SELECT day FROM course WHERE course_id LIKE "%'.$batch.'" AND table_name=?'); $query->execute([$_SESSION['table_name']]);
我输出为NULL;