gpt4 book ai didi

mysql last url id 始终为 0

转载 作者:太空宇宙 更新时间:2023-11-03 11:14:04 25 4
gpt4 key购买 nike

$urlid = mysql_query("SELECT URL_Id FROM url ORDER BY URL_Id DESC LIMIT 1");

foreach($textnode as $key => $value) {

$value = stripslashes($value);
$value = mysql_real_escape_string($value, $con);

mysql_query("INSERT INTO paragraphs (paragraphs, URL_Id)
VALUES ('$value', '$urlid')");


}

已为 URL_Id 列返回 0。有什么建议 ?它应该返回 1。

最佳答案

mysql_query 函数只检索资源对象。那么您需要通过 mysql_fetch_array() 函数进行循环并检索实际数据。

即:

while($rowFeach = mysql_fetch_array($urlid));

print_r($rowFeach);

试试这个。

谢谢。

关于mysql last url id 始终为 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6543908/

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