|
楼主 |
发表于 2011-7-26 12:16:35
|
显示全部楼层
jeongee 发表于 2011-7-26 11:53
一样弄
报错了:这是我写的部分代码,
$data['title'] = '登录成功';
$this->load->view('success',$data);
$query = $this->db->query("SELECT * FROM kingdom ID='$_GET[ID]'");
$row = $query->row_array();
echo $row['username'];
但是输出之后,
A PHP Error was encounteredSeverity: Notice
Message: Undefined index: ID
Filename: controllers/member.php
Line Number: 20
发生了一个数据库错误Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=''' at line 1
SELECT * FROM kingdom ID=''
Filename: D:\AppServ\www\kingdom\system\database\DB_driver.php
Line Number: 330
|
|