php如何顯示mysql資料庫記錄_PHP教程

來源:互聯網
上載者:User
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: 使用者:
密碼:

資料庫結構,把此代碼複製到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');

http://www.bkjia.com/PHPjc/630878.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630878.htmlTechArticlephp教程如何顯示mysql教程資料庫教程記錄 /* * Created on 2010-4-25 * * To change the template for this generated file go to * Window - Preferences - PHPeclips教程e -...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.