gpt4 book ai didi

php - 如何增加mysql_fetch_array指针?

转载 作者:可可西里 更新时间:2023-11-01 08:56:56 24 4
gpt4 key购买 nike

while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
$row = mysql_fetch_array($result, MYSQL_ASSOC) //it's not increase ?
}

我想在每个循环中增加两次?

对于

<table>
<td>**1 times**</td><td>**1 times**</td>
</table>

最佳答案

我认为文档非常清楚。 http://hu.php.net/manual/en/function.mysql-fetch-array.phphttp://hu.php.net/manual/en/function.mysql-fetch-assoc.php .

    mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb");

$result = mysql_query("SELECT id, name FROM mytable");

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
printf("ID: %s Name: %s", $row[0], $row[1]);
}

mysql_free_result($result);

关于php - 如何增加mysql_fetch_array指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3433679/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com