[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

How do I query all data to populate menus - JSP, MySQL, IE 7

Asked by blaadom in PHP for Windows, MySQL Server, PHP Scripting Language

Tags: jsp, mysql, from, populate

I want to run a select query from everything in a table, and display this information in drop down menus.
I can run a query to display everything from a table into normal cells but having trouble doing this for menus. I am using the following so far ...

<?PHP
require("connect.php");
// how many rows to show per page
$rowsPerPage = 200;
// by default we show first page
$pageNum = 1;

// if $_GET['page'] defined, use it as page number
if(isset($_GET['page']))
{
    $pageNum = $_GET['page'];
}

// counting the offset
$offset = ($pageNum - 1) * $rowsPerPage;
$query  = "SELECT * FROM clients ORDER BY 'clients' LIMIT $offset, $rowsPerPage";
$result = mysql_query($query);
?>

<?

while($row = mysql_fetch_row($result))
{
   
      $client_name = $row[0];
      $contact_name = $row[1];
      $client_add   = $row[2];
      $client_tel = $row[3];
      $client_email = $row[4];
 echo "
<tr style='background-color:#EFEFEF; color:#000000; font-family:Arial, sans-serif; font-size:11px; height:20px; font-weight:normal;'>

<td>$client</td>
<td>$contact_name</td>
<td>$client_address</td>
<td>$client_tel</td>
<td>$client_email</td>
</tr>";
}
?>

I want to have this data in a forum so I can put it in to another table.

<select name="client_name" id="client_name">
<option value='<?php echo $client; ?>' selected="selected"><?php echo $client; ?></option>
</select>
I get an error if I use the above.
Do I need to set an array for each query, or is there any simpler way of doing this?
 
Related Solutions
Keywords: How do I query all data to populate me…
 
Loading Advertisement...
 
[+][-]08/22/07 12:47 PM, ID: 19749168Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: PHP for Windows, MySQL Server, PHP Scripting Language
Tags: jsp, mysql, from, populate
Sign Up Now!
Solution Provided By: bportlock
Participating Experts: 2
Solution Grade: A
 
[+][-]08/22/07 12:36 PM, ID: 19749085Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/22/07 12:39 PM, ID: 19749106Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/22/07 01:08 PM, ID: 19749290Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/24/07 09:50 AM, ID: 19763612Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/24/07 11:12 PM, ID: 19766953Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/27/07 10:03 AM, ID: 19776752Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/27/07 03:27 PM, ID: 19779116Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/28/07 11:53 AM, ID: 19785809Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/28/07 06:54 PM, ID: 19788168Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/30/07 11:43 AM, ID: 19802915Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/30/07 12:44 PM, ID: 19803508Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/30/07 12:48 PM, ID: 19803544Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/07 11:14 AM, ID: 19827156Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/07 12:17 PM, ID: 19863489Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/07 12:20 PM, ID: 19863483Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628