我正在尝试从数据库中按顺序提取一个id列。我已经写了这段代码,但没有奏效。PHP注意:未定义偏移量1
$connection = mysqli_connect($servername,$username,$password,$dbname);
if(!$connection)
die("Database connection failed: " . mysqli_connect_error());
$query = "SELECT ID FROM channel ";
if($result = mysqli_query($connection,$query))
{
$count = mysqli_num_rows($result);// it will start from the first row and continue with others...
//fetch one and one row
while($row=mysqli_fetch_row($result))
{
for($i=0; $i
echo "$row[$i]";
}
//free result set
mysqli_free_result($result);
}
mysqli_close($connection);
所以,这个代码给了我这个错误:
注意:未定义抵消:1在C:\ XAMPP \ htdocs中\ GT \在线fetch_channel.php 24
谁能帮助我关于那个 ?
2017-04-21
Serhat
+0
嗨,u能请告诉你已经放在线24 –