电脑安全

您当前的位置:主页 > 电脑安全 >

php mysql查询类-网络编程

来源:[db:来源]标题:   用户    编辑:电脑技术全能网 时间:2019-09-19 12:34

原标题:php mysql查询类-网络编程
   php mysql查问类<?php class Ring{var $q_uid;var $q_name;var $q_type;var $q_head;var $q_sex;var $q_reg;public check_user($id){$sql="Select * from gx_member where id='$id'";$result=mysql_query($sql) or die(mysql_error());if (mysql_num_rows( $result ) ){$rs=mysql_fetch_object( $result);if( $rs->m_lock=='1' ){exit('对不起,你己被治理员锁定了');}elseif( $rs->m_del =='1') {exit('此用户己被删除');}else{$this->q_uid =$id;$this->q_name=$rs->m_name;$this->q_head=$rs->m_head$this->q_sex =$rs->sex == '1'? '男':'女';$this->q_reg =$rs->m_time;$this->q_type=$rs->type;}}else{exit('用户不存了..<a href=# onclick='history.back();'>点击前往</a>');}}public member_article(){$article_list ="Select * from gx_q where member_id='$this->q_uid";if( '0' == $this->query($article_list) ){echo '临时无信息';}else{foreach( $this->result as $list){$size =sizeof($list);for($i=0;$i<=$size;$i++){/* 222*/}}}public query($sql){if( empty( $sql) ){return '0';}else{$result=mysql_query($sql) or die(mysql_error());if( mysql_num_rows ($result) ){$array=array();while( $rs=mysql_fetch_array($result) )$array[]=$rs;}$this->result=$array;}else{return '0';}mysql_free_result($result);}}}?>注:本站原创转载说明: www.dnjishu.com

上一篇:PHP静态分析与跨站脚本检测-网络编程

下一篇:没有了