multiple while with mysql link.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Re: multiple while with mysql link.

Post by William »

straightman wrote:why are u using the forward slashes to scape the quotes when it should be backslashes?


Alvaro


============================================================================================

synking wrote:Hey i am trying to create a page that builds a 3 column table from a mysql database.

the way i have it setup is that all the mysql connection and query is done with in one page and then i have it process to include the actual page that outputs what is seen. so i have i query that pulls the info from mysql then it runs a few if statements if the result is incorrect or it is empty it out puts the search form. and if it gets info it outputs the table. At this point i want to be able to have a filter option for the mysql query so the table can be filtered. i am doing this be creating an select option in the table head with a while statement.


Code: Select all

while ($row = mysql_fetch_array($result))
{
    echo ("<option value=/"$row['city']/">$row[city]</option>\n");
}

I have this under the city column in the table. THe problem is that it only process this statement and seems to quit. It will not process the table or any of the other information after that bit of code.
Further down in the thread he states that he re-typed the first post. In his later postings that is fixed.
Post Reply