gpt4 book ai didi

php - mysql_fetch_row() : supplied argument is not a valid MySQL result resource in

转载 作者:行者123 更新时间:2023-11-29 01:47:20 25 4
gpt4 key购买 nike

<分区>

此查询出现错误(mysql_fetch_row():提供的参数不是有效的 MySQL 结果资源)。为什么?

<?php

set_time_limit(0);
//MySQL globals
$mysql_server = "***";//change this server for your Drupal installations
$mysql_user = "***";//Ideally, should be root
$mysql_pass = "***";//Corresponding password
$conn = mysql_connect($mysql_server,$mysql_user,$mysql_pass);//MySQL connection string


$query = "select * from dr_wiwe_old_node WHERE type = 'story'";
$noders = mysql_query($query);
var_dump($noders);
while ($row = mysql_fetch_row($noders)) {
$nid = $row[0];
$vid = $row[1];
$type = $row[2];
$title = mysql_real_escape_string($row[3]);
$uid = $row[4];
$status = $row [5];
$created = $row[6];
$changed = $row[7];
$comment = $row[8];
$promote = $row[9];
$moderate = $row[10];
$sticky = $row[11];
//Insertion into node
$query="insert into dr_wiwe_node values('" . $nid . "','"
. $vid . "','" . $type . "','','" . $title . "','" . $uid . "','"
. $status . "','" . $created . "','" . $changed . "','" . $comment
. "','" . $promote . "','" . $moderate . "','" . $sticky . "','0','0')";
if (!mysql_query($query)) {
print $query;
}
?>

错误在哪里或者我可以更改什么?

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