Help - Search - Members - Calendar
Full Version: Mysql While() Statment
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
Gregg
while($row=mysql_fetch_array(mysql_query("
NDBoost
how about posting the entier code?!

#1 try throwing the query into another line and a variable.. makes it easier to modify things later on.

IE:
CODE
mysqlconnect(); //connect to db
$sql = "SELECT * FROM design ORDER BY date DESC"; //define the SQL Query
$query = mysql_query($sql) or die ("Could Not Query: " . mysql_error()); //Run The Query
while ($row = mysql_fetch_array($query, MYSQL_ASSOC)) {
//blahlblahlblahl
}
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.