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?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to