php+mysql数据查询语句问题,两张表user,msg【高分求解】

php$sql_str="select toid,fromId,info,max(addDate) as A_date from msg where toid=1 group fromid order by fromId "$con = mysql_connect("localhost","mysql_user","mysql_pwd");if (!$con) { die('Could not connect: ' . mysql_error()); } $rs= mysql_...
php+mysql数据查询语句问题,两张表user,msg【高分求解】
<?php$sql_str="select toid,fromId,info,max(addDate) as A_date from msg where toid=1 group fromid order by fromId "$con = mysql_connect("localhost","mysql_user","mysql_pwd");if (!$con) { die('Could not connect: ' . mysql_error()); } $rs= mysql_query($sql_str,$con);while($row = mysql_fetch_assoc($rs)){ echo $row['toid']."__".$row['fromid']."__".$row['info']."__"$row['A_date']."</br>";} ?>2017-01-05
mengvlog 阅读 49 次 更新于 2025-10-29 01:58:22 我来答关注问题0
檬味博客在线解答立即免费咨询

mySQL相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部