home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 August / PCWorld_2001-08_cd.bin / Komunikace / phptriad / phptriadsetup2-11.exe / php / pear / DB / tests / numcols.inc < prev    next >
Text File  |  2000-12-06  |  382b  |  14 lines

  1. <?php
  2.  
  3. $dbh->setErrorHandling(PEAR_ERROR_DIE);
  4. $sth = $dbh->query("SELECT a FROM phptest");
  5. printf("%d\n", $sth->numCols());
  6. $sth = $dbh->query("SELECT a,b FROM phptest");
  7. printf("%d\n", $sth->numCols());
  8. $sth = $dbh->query("SELECT a,b,c FROM phptest");
  9. printf("%d\n", $sth->numCols());
  10. $sth = $dbh->query("SELECT * FROM phptest");
  11. printf("%d\n", $sth->numCols());
  12.  
  13. ?>
  14.