0

我一直在尝试使用 Lightface 弹出窗口将我的 streamitem_id 发送到我的喜欢页面。我可以使用普通链接来做到这一点,因为我的点赞页面显示了谁点赞了某个帖子。但是在尝试使用 javascript 发送 id 时,我没有做同样的事情。

这是我已经和尝试过的。

<script>
window.addEvent('domready',function(){          
document.id('start').addEvent('click',function() {
var number1=".$streamitem_data['streamitem_id'].";
light = new LightFace.IFrame({ height:400, width:800, url:'http://www.rawfeeds.co.uk/include/likes.php?streamitem_id='+number1+'', title: 'Likes' }).addButton('Close', function() { light.close(); },true).open();
});
});
</script>

我的选择中有一个错误,因此将streamitem_id打印出来并且它没有显示。所以我很确定它给了我这个,因为没有 id 被发送过来。

Array ( [streamitem_id] => .$streamitem_data['streamitem_id']. ) SELECT Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '['streamitem_id']. AND feedback_rating=1' at line 1

SQL

 <? 
if (isset($_GET['streamitem_id'])){

print_r($_GET);
$likes = mysql_query('SELECT feedback_streamid,feedback_userid,feedback_rating FROM streamdata_feedback WHERE feedback_streamid='.$_GET['streamitem_id'].' AND feedback_rating=1') or die("SELECT Error: ".mysql_error());
$numRowslikes= mysql_num_rows($likes);
while($row = mysql_fetch_array($likes)){
echo" $likes";
4

0 回答 0