[PHP] syntax help please?
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 "; 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]
[PHP] suggestions
I have a medium sized db... with about 300 feilds and 15k rows. I need to create a search that will submit user input to seach the db from about 30 different feilds with some of those wildcards. i.e bedrooms, bathrooms, price, pool, city, etc Would using an array for the results page be the best way to approach this in PHP? -- 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]
RE: [PHP] unset() in a class
I need to return a "file not found" if the search item is not found.. tryed my_sql_query(select from table where primary key = $primary key)or die "file not found" that didn't work suggestions anybody? please? purty please? -- 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]
RE: [PHP] if then else?
btw...this is the code i'm trying Please keep the laughter to a minimum...ah heck with it...laugh all you want...its good for ya Professional Experience: This field is empty output for users with a variable other than value1 or value2 This field is empty output for users with a variable other than value1 or value2 -- 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]
[PHP] if then else?
-Original Message- From: Glyndower [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 19, 2001 12:12 AM Cc: [EMAIL PROTECTED] Subject: Ok, here we go I'm new to PHP and also to MySql, but i'm making a pretty good go so far. Until now, lol I have a mysql database with several optional feilds (pe1.pe2.pe2,e1,e2,e3, etc) What I'm looking for is a way to check the value of each optional feild and if said feild is "not null" or contains data. I want to create a header for that feild and then a bulleted list of the options in the feilds under the header. i.e something along the lines of: So the final output would end up like: Professional Education * College * High School * Middle School TIA -- 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]