最新回答 / 阳火锅
用while循环这条语句。。数据库里面的就全部出来了..写法:while($row = mysql_fetch_row($query)){ echo $row; }
2018-05-07
//遍历文章列表
if(!empty($data)){
foreach($data as $value){
//show every article
}
}
if(!empty($data)){
foreach($data as $value){
//show every article
}
}
2018-04-23
//取得所有文章的列表
$s = "select * from article order by dateline desc";
$r = mysqli_query($con, $s);
if(!$r && mysqli_num_rows($r)){
while($row = mysqli_fetch_assoc($r)){
$date[] = $row;
}
}
else{
$date = array();
}
$s = "select * from article order by dateline desc";
$r = mysqli_query($con, $s);
if(!$r && mysqli_num_rows($r)){
while($row = mysqli_fetch_assoc($r)){
$date[] = $row;
}
}
else{
$date = array();
}
2018-04-23
$con = mysqli_connect(HOST, USERNAME, PASSWORD) or die('connect failed');
mysqli_select_db('info');
mysqli_query($con, 'set name utf8');
mysqli_select_db('info');
mysqli_query($con, 'set name utf8');
2018-04-23
$r = mysqli_query($c, $s);
1,$s为insert, update, delete时,$r为true或false;
2,$s为select时,$r为resultSet或false;
1,$s为insert, update, delete时,$r为true或false;
2,$s为select时,$r为resultSet或false;
2018-04-22