PHP tutorial How to display MySQL Tutorial database tutorial record
/*
* Created on 2010-4-25
*
* To change the template for this generated file go to
* Window-preferences-phpeclips Tutorial 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: User: |
Password: |
The > Delete
Database structure, copy this code to phpMyAdmin run
SET sql_mode= "No_auto_value_on_zero";
--
--Database: ' member '
--
-- --------------------------------------------------------
--
--The structure of the table ' User_list '
--
CREATE TABLE ' User_list ' (
' UID ' int (one) not NULL auto_increment,
' m_id ' varchar (5) Not NULL,
' username ' varchar (+) not NULL,
' Password ' varchar (+) not NULL,
PRIMARY KEY (' uid ')
) Engine=myisam DEFAULT charset=gb2312 auto_increment=11;
--
--Export the data in the table ' User_list '
--
INSERT into ' user_list ' (' uid ', ' m_id ', ' username ', ' password ') VALUES
(9, ' 1 ', ' admin ', ' 75cf565ad38d0f837c43363e402b1a00 '),
(Ten, ' 2 ', ' admin2 ', ' 75cf565ad38d0f837c43363e402b1a00 ');
http://www.bkjia.com/PHPjc/630878.html www.bkjia.com true http://www.bkjia.com/PHPjc/630878.html techarticle PHP Tutorial How to display MySQL Tutorial database tutorial Record/* * Created on 2010-4-25 * * To change the template for this generated file go to * Window- Preferences-phpeclips Tutorial E-...