<?php
$connect = mysqli_connect('localhost','root','','intertrading') or die('Unale to connect');
$sql = "select * from user";
$result = mysqli_query($connect,$sql);
while($row = mysqli_fetch_row($result)){
echo 'id:'.$row[0];
echo '<br>';
}
相关文章
- Call to undefined function mysqli_connect()
- fatal error: Call to undefined function mysqli_connect()
- DataGrip :Cannot connect to a database
- Zabbix Cannot connect to the database
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
- 解决 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
- Error connecting to database [Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)]
- mysqli connect database and print
- Can't connect on database on my localhost
- Fatal error: Uncaught Error: Call to undefined function mysqli_connect()