$Conn = mysql_connect('localhost', 'root', 123456789) or die(mysql_error);
msql_query('SET NAMES UTF8');//数据库编码
mysql_select_db('数据库名称');
$Resl = mysql('select id, mm from 表名称 where name = \'admin\' ') or die(mysql_error());
while ( $rs = mysql_fetch_array( $Resl ) ) {
echo 'id是:', $rs['id'], ' mm是:', $rs['mm'], '
';
}
sql = 'select * from mytable where name="admin"';
result = mysql_query(sql)
print_r(result['name'])
print_r(result['id'])
print_r(result['mm'])