本文给大家介绍PHP与SQL语句常用大全,具体代码如下所述: <?php $conn=mysql_connect(localhost,root,root); mysql_select_db(db_database17,$conn); mysql_query(set names gb2312); ?> <?php $sql1=mysql_query(select usernc,face,ip,email,qq from tb_user where id='.$info[userid].',$conn); $info1=mysql_fetch_array($sql