我想从表中选择最近的条目,看看该条目是否与用户尝试输入的条目完全相同.如何查询“从最近的’发布’条目中选择*”?
$query="Select * FROM
//confused here
(SELECT * FROM posting ORDER BY date_added DESC)
WHERE user_id='{$_SESSION['user_id']}'
AND title='$title'
AND price='$price'
AND city='$city'
AND state='$state'
AND detail='$detail'
";
$data = MysqLi_query($dbc,$query);
$row = MysqLi_fetch_array($data);
if(MysqLi_num_rows($data)>0)
{
echo "You already posted this ad. Most likely caused by refreshing too many times.";
echo "
最佳答案
原文链接:https://www.f2er.com/mysql/433951.html