douqiaoru2583 2013-06-15 17:51
浏览 42
已采纳

数据无法插入

I have database contain table named demnads table contain 11 cell first one is id auto increasement I want to add data's with this sql command in php :

<?php 
$hostname_mystore = "localhost";
$database_mystore = "mystore";
$username_mystore = "root";
$password_mystore = "";
$mystore = mysql_pconnect($hostname_mystore, $username_mystore, $password_mystore) or trigger_error(mysql_error(),E_USER_ERROR); 
mysql_query("set character_set_server='utf8'");
mysql_query("set names 'utf8'"); 
if (mysqli_connect_errno())
  {  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
$sql= "INSERT into demands ( itemname , case , cname , fatora , client , cdate , ctime , prices , cmobile , numbers) values('$item[$i]','$cases[$i]','$customer[$i]','$fatora[$i]','$client[$i]','$dates[$i]','$times[$i]','$price[$i]','$mobile[$i]','$numbers[$i]' )";
?>

but data's didn't be inserted

  • 写回答

4条回答 默认 最新

  • douxin2011 2013-06-15 17:59
    关注

    You forgot to call mysql_query( $sql, $conn )

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路