php的查询功能(怎么通过查询条件获取相应表的字段)
程序员文章站
2022-06-07 10:20:03
...
php的查询功能(如何通过查询条件获取相应表的字段)
\n";
\n";
?>
无标题文档
------解决方案--------------------
result = mysql_query("select * from books where checked=‘$checked’ ");
------解决方案--------------------
if(isset($_POST['checked'])){
@$result = mysql_query("select * from books",$db);
echo "\n";
//获得连接
$db = mysql_connect("localhost", "root", "root") or die(mysql_error());
//echo "Connected to MySQL
";
//连接数据库
mysql_select_db("test") or die(mysql_error());
//echo "Connected to Database";
//查询数据,并用表格显示出来
@$checked = $_POST['checked'];
@$result = mysql_query("select * from books",$db);
echo "
isbn | author | title | price |
%s | %s | %s | %s | ", $myrow[0], $myrow[1],$myrow[2],$myrow[3]);
?>
------解决方案--------------------
result = mysql_query("select * from books where checked=‘$checked’ ");
------解决方案--------------------
if(isset($_POST['checked'])){
@$result = mysql_query("select * from books",$db);
echo "
isbn | author | title | price |
上一篇: linux mysql 常见问题解决方案
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论