当我尝试运行该代码时,会出现该错误: 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的 '' 附近使用正确的语法
而且我不知道是什么问题,有人可以帮助我吗?
代码:
<?php include_once("includes/head.php"); ?>
<?php require_once("includes/connect/connect.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php require_once("includes/jquery.php"); ?>
<?php function friend_request_notification(){
global $db;
global $userid;
$userid = $_SESSION['userid'];
$query_id_see = "SELECT user_id FROM friend_requests WHERE user_id={$userid}";
$result_set3 = mysql_query($query_id_see, $db) or die(mysql_error());
$insert_table = "INSERT INTO friend_requests_notificated (id, user_id, user_id_requester)";
$change_table2 = mysql_query($insert_table) or die(mysql_error());
$select_table = "SELECT id, user_id, user_id_requester FROM friend_requests WHERE user_id={$userid}";
$change_table1 = mysql_query($select_table) or die(mysql_error());
if ($id_requests = mysql_fetch_array($result_set3)){
if ($id_requests2 = mysql_fetch_array($change_table2))
{
}
if ($id_requests1 = mysql_fetch_array($change_table1))
{
}
}
else
{
}
}
friend_request_notification();
?>