PHP 的 MySQL 操作类,跟手册上的函数一样用,但是更方便了。多说无益,看了就知道了。(10) echo "getProtoInfo() -- ".$DMC->getProtoInfo().'<br>';echo "getServerInfo() - ".$DMC->getServerInfo().'<br>';echo "info() ---------- ".$DMC->info().'<br>';*///---------------------------------------------------------/**3//取得指定库的所有表$DMC->listTables("test");while($row = $DMC->fetchRow()){ print "Table: ".$row[0]."\n";}//下面for的效果跟上面while的一样for ($i = 0; $i < $DMC->numRows(); $i++){ printf ("Table: %s\n", $DMC->tablename($i));}*///---------------------------------------------------------/**2//数据查询$DMC->query("SELECT * FROM `purchase_product` LIMIT 1");while($fetchObject = $DMC->fetchObject(3)){ print_r($fetchObject); print_r($DMC->fetchLengths()); // 是记录的长度,不是字段的长度 //print_r($DMC);}*///---------------------------------------------------------/**1// 取得指定库指定表名称的字段$DMC->listFields("test","purchase_product");$a = $DMC->numFields();for($i=0; $i<$a; $i++){ echo $DMC->fieldName($i).' ';}*//////////////////////////////////////////////////// //// 环境:PHP5.0.2 + APACHE:2.0.52 +Win2Kp_sp4 //// ///////////////////////////////////////////////////?>