syntax help please?

From: Date: Wed, 29 Aug 2001 14:45:44 +0000
Subject: syntax help please?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65029@lists.php.net to get a copy of this message
I'm coming over from the ASP side and I'm trying to get a handle on this stuff, I could use a little help with the how and wheres, please. I do ok with the SQl bits, but the PHP bits are still being elusive... Heres my code: $sql = "SELECT listnum,agentname,listAgent,streetName,streetNum,curprice,email_addr,officen ame,officephone,agentname,agentphone,bedrooms,full_baths,half_baths,customer Remarks FROM mlsdb WHERE mlsdb.statusCode = 'A' AND mlsdb.catgNum = '1'"; $result = mysql_query($sql); //load it all into the associative array while(list($listnum,$agentname,$streetName,$streetNum) = mysql_fetch_row($result)): echo "$listnum $agentname $streetNum $streetName <br>"; endwhile; ?> Which displays: 50730 Aubrey May Wyndwood Drive 0 873171 Tia Lingle Palm Trl 9903 902385 Anthony Kipen Normandy Blvd 6458 ... As you can see the $streetNum displays BEFORE the $streetName, I'm assuming thats becuase thats the order they are in in the query..(?) Heres my "I'm a newbie" question... exactly how and where do I define the variables so that i can use them in a different order than they are in the query?

« previous php.general (#65029) next »