[PHP] mysql php链接mysql数据库并作简单的查询 →→→→→进入此内容的聊天室

来自 , 2021-01-27, 写在 PHP, 查看 237 次.
URL http://www.code666.cn/view/ef72d539
  1. <?php
  2. $UserName = 'abc';
  3. $Password = '1234';
  4. $DbHandle = mysql_connect ('localhost', $UserName, $Password);
  5. if (!$DbHandle) {
  6.   die 'No database connection could be established.';
  7. }
  8.  
  9. $DBName = 'w3db;
  10. if (!mysql_select_db ($DBName, $DbHandle)) {
  11.  die 'Database could not be selected.';
  12. }
  13. ?>
  14.  
  15.  

回复 "mysql php链接mysql数据库并作简单的查询"

这儿你可以回复上面这条便签

captcha