doufu1939 2018-07-31 19:04
浏览 334

$ query = mysqli_query($ conn,$ sql); 在服务器上返回false [重复]

This question already has an answer here:

    $count = count($down_length);

        for ($i = 0; $i < $count; $i++) {
            $sql = "insert into orders (invoice_id,up_length,up_shoulder,up_sleeve1,up_sleeve2,up_sleeve3,up_chest1,up_chest2,
up_stomach1,up_stomach2,up_hips1,up_hips2,up_neck,down_length,down_fork1,down_fork2,down_bottom1,down_bottom2,down_knee1,down_knee2,
down_thigh1,down_thigh2,down_waist1,down_waist2,down_hips,product,any_other)
values('$last_invoiceid','$top_length[$i]','$top_shoulder[$i]','$top_sleeve1[$i]','$top_sleeve2[$i]','$top_sleeve3[$i]','$top_chest1[$i]','$top_chest2[$i]',
'$top_stomach1[$i]','$top_stomach2[$i]','$top_hips1[$i]','$top_hips2[$i]','$top_neck[$i]','$down_length[$i]','$down_fork1[$i]','$down_fork2[$i]','$down_bottom1[$i]',
'$down_bottom2[$i]','$down_knee1[$i]','$down_knee2[$i]','$down_thigh1[$i]','$down_thigh2[$i]','$down_waist1[$i]','$down_waist2[$i]','$down_hips[$i]','$product[$i]',
'$any_others[$i]')";

            $query = mysqli_query($conn, $sql);
var_dump($query);
echo '<br>';}
            if ($query) {
                header('location:../product_print.php');
            }

its work perfectly on xamp server localhost.but while in a live server with PHP 7 running $query return false. what am I doing wrong here?

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题
    • ¥20 win11修改中文用户名路径
    • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
    • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
    • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
    • ¥15 帮我写一个c++工程