php howto 22 GE3LRDXVOOJTF5JPGH3SNUBOY25LB2IHNGEKV2Y


PHP HOW-TO: Appendix J phpDBTest.php3 Example Next Previous Contents 22. Appendix J phpDBTest.php3 Example Submitted by: Joe Thong darkjoe@softhome.net Site URL: http://phpdb.linuxbox.comDescription: A PHP database wrapper for various database servers with a powerful Recordset for result data manipulation. Database results are flushed automatically by phpDB. To get this file, in the web-browser, save this file as 'Text' type as phpDBTest.php3 <html> < head> < title>Untitled< /title> < /head> < body> <?php // Assumed this file is placed in the same directory with phpDB.inc include("phpDB.inc"); $db = new phpDB(); $db->pconnect("hostName", "userName", "passWord", "databaseName") or die ("Can't connect to database server or select database"); $rs = $db->execute("SELECT * FROM Items"); $numOfRows = $rs->getNumOfRows(); echo "Number of Rows: $numOfRows"; $rs->firstRow(); // optional, but recommended while (!$rs->EOF) { // Fields collection accessible as associative arrays too echo "<br>" . $rs->fields[0]; $rs->nextRow(); // NOTE: nextRow() is placed at below } $rs->close(); $db->close(); // optional ?> < /body> < /html> Next Previous Contents

Wyszukiwarka

Podobne podstrony:
php howto 16
ax25 howto 22
keyboard and console howto 22 ecn6bnaifg6xs2om5ry5mysjmkcqjsdeqalqogy
php howto 14
postgresql howto 22 sfvzpieih2uu5gy7aw3qmrefr3sslxsis6kbxca
consultants howto 22
php howto 11
php howto 4
php howto 1
php howto 7
php howto 15
php howto 23
php howto 9
php howto 12
php howto 2
php howto
php howto 8
multi disk howto 22 jrz4dw45aye5hz6wdpxvrmflu64l7q6tyftidta
text terminal howto 22 ubalhv6pmumdby22mufhx3ivbqploo4mucmyina ubalhv6pmumdby22mufhx3ivbqploo4mucmyi

więcej podobnych podstron