Home  >  Article  >  Backend Development  >  PHP中数据库查询并展示

PHP中数据库查询并展示

WBOY
WBOYOriginal
2016-06-13 12:45:51759browse

PHP中数据库查询并显示

$cur_roomID=$_GET['roomID'];<br />
    $query="SELECT *FROM room WHERE roomID=".$cur_roomID."";<br />
    $result=mysql_query($query);<br />
	$row = mysql_fetch_row($result);<br />
	$cur_roomtype = $row['roomtype'];<br />
    $cur_roomsize = $row['roomsize'];

为什么总是找不到结果
我想从数据库中得到roomtype和roomsize的值

PHP MySQL
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn