Re: **_fetch_row?

From: Date: Thu, 12 Oct 2000 17:37:41 +0000
Subject: Re: **_fetch_row?
Groups: php.general 
Request: Send a blank email to php-general+get-19836@lists.php.net to get a copy of this message
Addressed to: "Jari Ivanoff" <jari.ivanoff@telia.com> php-general@lists.php.net ** Reply to note from "Jari Ivanoff" <jari.ivanoff@telia.com> Thu, 12 Oct 2000 17:34:48 +0200 > > Hi! I would like if someone could explain in a "beginners" language how > to use the fetch_row commands? I do not really understand that one... I > have noticed that it can be used with almost all RDBMS.... I.e. > mysql_fetch_row and mssql_fetch_row... /Jari If you do a select: $Result = mysql_query( "SELECT Name, Address, City " . "FROM Table " ); You can then retrieve entire rows at a time with *_fetch_row: while( list( $Name, $Address, $City ) = mysql_fetch_row( $Result )) { echo "$Name $Address $City<BR>\n"; } Note that the fields are returned as an array, which list() breaks up into individual simple variables. The order of the fields is the same as the SELECT list in the query. Rick Widmer Internet Marketing Specialists www.developersdesk.com

« previous php.general (#19836) next »