选择不同的线路加载不懂得表 原句是这个, $q="SELECT * FROM `line` LEFT JOIN research2 on line.busname = research2.busname WHERE banben is NULL or banben like '%{$_REQUEST['banben']}%'";
根据原句修改后报错 $q="SELECT * FROM `'%{$_REQUEST['xianlu']}%'` LEFT JOIN research2 on '%{$_REQUEST['xianlu']}%'.busname = research2.busname WHERE banben is NULL or banben like '%{$_REQUEST['banben']}%'";
回复讨论(解决方案)
$q="SELECT * FROM `{$_REQUEST['xianlu']}` LEFT JOIN research2 on `{$_REQUEST['xianlu']}`.busname = research2.busname WHERE banben is NULL or banben like '%{$_REQUEST['banben']}%'";