作者:双子座-海_358 | 来源:互联网 | 2023-05-16 04:15
i have this code:
我有这个代码:
then i have my getMessageDetails.php:
然后我有我的getMessageDetails.php:
getUnopenedMessagesCount($_SESSION['user_id']) + 1;
$last_unopened_message_row = $obj_clean->getLastUnopenedMessage($_SESSION['user_id'],$lastNewMessageCnt);
echo json_encode($last_unopened_message_row);
?>
and my html:
和我的HTML:
echo "";
echo ''.$r['subject'].' | ';
echo ''.$uniqueCode1.''.$uniqueCode2.''.$uniqueCode3.' | ';
echo "
";
how come when i alert(json) i get the values im supposed to get which is the last message:
我怎么警告(json)我得到的值我应该得到哪个是最后一条消息:
[{"subject":"Freechat ha ha","id":"15","created_at":"2011-08-29 11:16:45","unique_code":"LUCINEM000RC","opened_once":"0"}]
BUT as soon as i code this:
但是只要我编码这个:
alert($("#subject").html(json.subject));
alert($("#message_id").html(json.id));
alert($("#unique_code1").html(json.unique_code));
i get the first message's details??? which is not what i want where am i going wrong please?? thank you
我得到第一条消息的详细信息???这不是我想要的地方我想去哪里?谢谢
2 个解决方案