php insert into 插入不进去数据库
<?php$dbc=mysqli_connect('localhost','root','sunheji','table');if($dbc){echo"链接成功";}e...
<?php
$dbc=mysqli_connect('localhost','root','sunheji','table');
if($dbc){
echo"链接成功";
}else{
echo"链接失败";
}
$sql="INSERT INTO 'table'(number ,name ,class ,score)VALUES ('2014025591', 'HAQ', '14-3', '64')";
if($sql){
echo"链接成功";
}else{
echo"链接失败";
}
?>
local host 都是链接成功 展开
$dbc=mysqli_connect('localhost','root','sunheji','table');
if($dbc){
echo"链接成功";
}else{
echo"链接失败";
}
$sql="INSERT INTO 'table'(number ,name ,class ,score)VALUES ('2014025591', 'HAQ', '14-3', '64')";
if($sql){
echo"链接成功";
}else{
echo"链接失败";
}
?>
local host 都是链接成功 展开
3个回答
推荐于2016-07-15
展开全部
<?php
$dbc = mysqli_connect('localhost','root','sunheji','table');
echo $dbc ? '成功' : '失败';
$sql="INSERT INTO `table` (number ,name ,class ,score)VALUES ('2014025591', 'HAQ', '14-3', '64')";
echo mysqli_query( $dbc, $sql ) ? '成功' : '失败,错误信息:' . mysqli_error( $dbc );
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询