从一个不错的留言本弄的mysql数据库操作类,初学php的朋友可以参考下 <?php class mysql{ var $querynum = 0; function connect($dbhost, $dbuser, $dbpw, $dbname = '',$dbcharset='') { if(!@mysql_connect($dbhost, $dbuser, $dbpw)) { $this->show('Can not connect to MySQL server'); return false; } if($dbname