链接数据库
            时间:2014-06-29 14:11:36  
            收藏:0  
            阅读:288
        
        
        1 //生成一个连接 2 $db_connect=mysql_connect($dbhost,$username,$userpass) or die("Unable to connect to the MySQL!"); 3 4 //选择一个需要操作的数据库 5 mysql_select_db($dbdatabase,$db_connect); 6 7 //执行MySQL语句 8 $result=mysql_query("SELECT id,name FROM user"); 9 10 //提取数据 11 $row=mysql_fetch_row($result);
            评论(0)
        
        
        