使用mysqli插入数据,如下代码 sql语句正确,但是没有插入到数据库中
$appid=$_GET['appid'];$nid=$_GET['nid'];$type=$_GET['type'];$uuid=$_GET['uuid'];$coun...
$appid = $_GET['appid'];
$nid = $_GET['nid'];
$type = $_GET['type'];
$uuid = $_GET['uuid'];
$countryCode = $_GET['countryCode'];
$appver = $_GET['appver'];
$client = $_GET['client'];
$conn = mysqli_connect($config['db']['host'], $config['db']['userName'], $config['db']['userPass'], $config['db']['dbName']);
mysqli_select_db($conn, $config['db']['dbName']);
$sql = "INSERT INTO`t_log_clicks`(`aid`,`nid`,`type`,`uuid`,`countryCode`,`appver`,`client`,`logtime`)
VALUES ('".$appid."','".$nid."','".$type."','".$uuid."','".$countryCode."','".$appver."','".$client."','".$time."')";
echo $sql;
$result = mysqli_query($conn,$sql);
mysqli_close($conn); 展开
$nid = $_GET['nid'];
$type = $_GET['type'];
$uuid = $_GET['uuid'];
$countryCode = $_GET['countryCode'];
$appver = $_GET['appver'];
$client = $_GET['client'];
$conn = mysqli_connect($config['db']['host'], $config['db']['userName'], $config['db']['userPass'], $config['db']['dbName']);
mysqli_select_db($conn, $config['db']['dbName']);
$sql = "INSERT INTO`t_log_clicks`(`aid`,`nid`,`type`,`uuid`,`countryCode`,`appver`,`client`,`logtime`)
VALUES ('".$appid."','".$nid."','".$type."','".$uuid."','".$countryCode."','".$appver."','".$client."','".$time."')";
echo $sql;
$result = mysqli_query($conn,$sql);
mysqli_close($conn); 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询