Mailinglisten-Archive |
Hi, * Bjoern Schmidt wrote: > $link = mysql_connect("127.0.0.1","gb_user",""); Danach: mysql_select_db( "guestbook" ); // "guestbook",$link); $query = "SELECT name FROM eintraege WHERE id=1"; if ( $res = mysql_query( $query ) ) { if ( mysql_num_rows( $res ) > 0 ) { $name = mysql_result( $res,0 ); /* oder: * * $row = mysql_fetch_array( $res ); * * $name = $row["name"]; * */ print "Name ist $name<br>\n"; } else { print "Es existiert kein Datensatz mit der ID 1"; } } else { print "MySQL-Fehler: ".mysql_error()."<br>\n"; } HTH, Björn. -- <?php class new_media_development { var $url="http://www.rent-a-phpwizard.de/"; var $fon="0931/7843792"; var $fax="0931/7843795"; } ?> /* Björn Schotte, "Mr. PHP" */
php::bar PHP Wiki - Listenarchive