发布网友 发布时间:2023-10-30 06:08
共2个回答
热心网友 时间:2023-12-22 02:10
$query = mysql_query("SELECT `sex` FROM `user` where `uname`='$x'"); $row = mysql_fetch_array($query); $y = $row['sex']; 不用谢那么多引号吧。。。变量在双引号内可以赋值的~热心网友 时间:2023-12-22 02:11
$query=mysql_query("select sex from user where uname='".$x."'"); $rs = mysql_fetch_assoc($query); $y = $rs['sex'];