1、mysql

header("Content-Type: text/html; charset=utf-8") ;
set_time_limit(0);
error_reporting( E_ALL&~E_NOTICE );
 
$con = mysql_connect("localhost","root","root");
if (!$con) {  die('Could not connect: ' . mysql_error());  }

mysql_select_db("test2", $con);

$result = mysql_query("SELECT * FROM ad");

while($row = mysql_fetch_array($result))
  {
  echo $row['title'] . " " . $row['url'];
  echo "<br />";
  }

mysql_close($con);

 

2、mysqli

 

相关文章:

  • 2021-08-02
  • 2022-01-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2021-12-02
  • 2021-06-10
相关资源
相似解决方案