Re: foreach with mysql

From: Date: Fri, 02 May 2003 02:17:44 +0000
Subject: Re: foreach with mysql
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19746@lists.php.net to get a copy of this message
mysql_fetch_assoc is one way to do it. $row = mysql_fetch_assoc ($exec); You can then use $row and access the data by pointing to the hash names based on the Column names. "S Garriock" <s.garriock@rgc.aberdeen.sch.uk> wrote in message news:C38C2BF85167D211B92200A0C9EA2514911DAA@SERVER5... Hi I am trying to use a FOREACH command to go through a mysql result with 2 columns. They are ID and name I need the name one the ID one is just for referrence. Anyone got the syntax for it? Thanks tons From Shaun Garriock RGC Webmaster *** The contents of this message are confidential and are intended for the addressee only. The views expressed in this message do not necessarily represent those of Robert Gordon's College. Electronic mail transmission is not guaranteed to be secure, therefore, Robert Gordon's College does not accept liability for the contents of this transmission. This message does not form a legal binding contract. ***

« previous php.windows (#19746) next »