Home > php教程 > php手册 > php如何显示mysql数据库记录

php如何显示mysql数据库记录

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:07:24
Original
1437 people have browsed it

php教程如何显示mysql教程数据库教程记录
/*
 * Created on 2010-4-25
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclips教程e - PHP - Code Templates
 */
 $conn=mysql_connect('localhost','root','');
 mysql_select_db('member',$conn);


 $sql="select * from user_list";
 $query=mysql_query($sql);
 while($row=mysql_fetch_array($query))
 {
?>



 
 
 
 
 
删除
  }?>
id:=$row[uid]?> 用户:=$row[username] ?>
密码:=$row[password]?>

数据库结构,把此代码复制到phpmyadmin运行


SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- 数据库: `member`
--

-- --------------------------------------------------------

--
-- 表的结构 `user_list`
--

CREATE TABLE `user_list` (
  `uid` int(11) NOT NULL auto_increment,
  `m_id` varchar(5) NOT NULL,
  `username` varchar(25) NOT NULL,
  `password` varchar(64) NOT NULL,
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=gb2312 AUTO_INCREMENT=11 ;

--
-- 导出表中的数据 `user_list`
--

INSERT INTO `user_list` (`uid`, `m_id`, `username`, `password`) VALUES
(9, '1', 'admin', '75cf565ad38d0f837c43363e402b1a00'),
(10, '2', 'admin2', '75cf565ad38d0f837c43363e402b1a00');

 

Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template