| PHP Schulung |
||
MySQL IIVerschiedene MySQL-Befehle:
Programm-Beispiel:
<?php
if (!mysql_connect("localhost","root","")) {
print "Fehler: ".mysql_error();
} else {
mysql_select_db("test");
if (!$res = mysql_query("select * from foo order by bar limit 0,5")) {
print "Query schlug fehl: ".mysql_error();
} else {
while ($row = mysql_fetch_array($res)) {
/**
* assuming that table has two fields, bar and x
*/
print "bar: ".$row["bar"]."
|
||
|
|
||
| Written & © by team@thinkphp.de Licence: OPL. |