server-php-sql-example-query.php / php
<h4>query -- php/mysql</h4> <br> <?php mysql_connect("localhost", "root", "hush") or die(mysql_error()); mysql_select_db("local") or die(mysql_error()); // Retrieve all the data from the "example" table // store the record of the "example" table into row result ); // Print out the contents of the entry echo "Name: ".row['age']."<br />"; ?> <br> <h4>In a loop remainder(s)</h4> <br> <?php while(result)){ echo row['age']; echo "<br />"; } ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.