sql=mysql_query($query) or die(mysql_error()." ".$query); return $this->sql; } //########################################执行mysql_fetch_array()############################# function fetch($sql)//此方法的参数是$sql就是sql语句执行结果 { $this->r=mysql_fetch_array($sql); return $this->r; } //#################执行fetchone(mysql_fetch_array())##################################### //此方法与fetch()的区别是:1、此方法的参数是$query就是sql语句 //2、此方法用于while(),for()数据库指针不会自动下移,而fetch()可以自动下移。 function fetch1($query) { $this->sql=$this->query($query); $this->r=mysql_fetch_array($this->sql); return $this->r; } //############################执行mysql_num_rows()####################### function num($query)//此类的参数是$query就是sql语句 { $this->sql=$this->query($query); $this->num=mysql_num_rows($this->sql); return $this->num; } //###########################执行numone(mysql_num_rows())#################### //此方法与num()的区别是:1、此方法的参数是$sql就是sql语句的执行结果。 function num1($sql) {$this->num=mysql_num_rows($sql); return $this->num; } //###############################执行free(mysql_result_free())################# //此方法的参数是$sql就是sql语句的执行结果。只有在用到mysql_fetch_array的情况下用 function free($sql) {mysql_free_result($sql); } //###########################执行seek(mysql_data_seek())################# //此方法的参数是$sql就是sql语句的执行结果,$pit为执行指针的偏移数 function seek($sql,$pit) {mysql_data_seek($sql,$pit); } //###########################执行id(mysql_insert_id())#################### function lastid()//取得最后一次执行mysql数据库id号 {$this->id=mysql_insert_id(); return $this->id; } //############################################################################ } ?>
然后提示密码账户出错!~什么意思!~
|