note 5344 deleted from mysql_query by danbeck

From: Date: Thu, 07 Sep 2000 17:18:26 +0000
Subject: note 5344 deleted from mysql_query by danbeck
Groups: php.notes 
Request: Send a blank email to php-notes+get-4425@lists.php.net to get a copy of this message
Examples: $result = mysql_db_query("db_name","sql statement"); And as for iterating stuff over and over (like listing each row of a table), I use this construct... (you'll see that I'm a fan of comments, especially for regex's) $result = mysql_db_query("db_name","sql statement"); if ($row = mysql_fetch_row($result)) { do { print $row[0]; print $row[1]; ..etc... } while ($row = mysql_fetch_row($result)); // end while : prints each row } else { print "No results"; } // end if : checks for rows to select I hope this helps. Dave Beaudoin, Webmaster http://www.e-underground.net/

« previous php.notes (#4425) next »