我是 php 新手。我正在使用以下代码在表中插入两个整数值。
<?php
include 'config.php';
$from = 1;
$to = 3;
$query = "INSERT INTO 'friendrequests'('from','to') VALUES(1,3)";
echo $query;
$result = mysql_query($query);
echo $result;
// if($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if($result)
{
echo "1";
//exit();
}
else
{
echo "0";
// exit();
}
}
但 echo 也根本没有打印任何值。只是得到 0 作为响应。请帮我解决。提前致谢。