我一直在以不同的方式测试我的 sql 语句,但它不起作用。我在 sql 语句中编写变量和会话时遇到问题。
function onelike()
{
$_SESSION['admin_id']
$resultLikeCheck = "SELECT FROM tbladminXshouts WHERE postId = $row['id'] AND admin_id = $_SESSION['admin_id']";
$results = mysql_query($resultLikeCheck) or die('');
if(mysql_num_rows($results) == 0)
{
echo ('
`<form action="" method="POST">
<input type="hidden" name="id" value="'.$row['id'].'"/>
<input type = "submit" name="Gilla" value = "Gilla"/>
</form>`
');
}
}
它有什么问题?