[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!

7.4

do {} while within another do {} while ?

Asked by theprankstanator in PHP and Databases

Tags: within

Hey Guys,

Basically, I have 2 tables, 'phone_man' and 'phones'.

The tables are set as such;

mysql> SHOW COLUMNS FROM phone_man;
+-------------------+----------------+------+-----+---------+----------------+
| Field                 | Type            | Null  | Key | Default | Extra            |
+-------------------+----------------+------+-----+---------+----------------+
| phone_manid    | int(11)          |        | PRI | NULL    | auto_increment |
| name               | varchar(100) |        |       |            |                    |
| logo                 | varchar(100) | YES  |       | NULL    |                    |
+-------------------+----------------+------+-----+---------+----------------+

mysql> SHOW COLUMNS FROM phones;
+----------+---------------+------+------+---------+----------------+
| Field     | Type           | Null   | Key | Default | Extra             |
+----------+---------------+------+------+---------+----------------+
| phoneid | int(11)         |        | PRI  | NULL    | auto_increment |
| name    | varchar(100)|        |        |            |                |
| body     | blob             |        |        |            |                |
| image   | varchar(100)| YES  |        | NULL    |                |
| price     | varchar(100)| YES  |        | NULL    |                |
| man      | varchar(100)|        |        |            |                |
+----------+---------------+------+------+---------+----------------+

Now, the plan is, that the phones that are made from phone_man will be listed under that; so for eg

SELECT * from phone_man
row, blah blah
SELECT * from phones WHERE $phone_man['name'] = man

See what i mean? man, its hard to explain, heres my code...

********************************************************
$phone_man_query = "SELECT * FROM phone_man ORDER BY name DESC" or die(mysql_error());
$phone_man_r = mysql_query($phone_man_query) or die(mysql_query());
$phone_man_row = mysql_fetch_assoc($phone_man_r);

do {
                        echo '<a name="' . $phone_man_row['name'] . '"><h1>' . $phone_man_row['name'] . '</h1></a>';

                        $query = "SELECT * FROM phones ORDER BY name WHERE man = '{$phone_man_row['name']}'" or die(mysql_error());
                        $r = mysql_query($query) or die(mysql_error());
                        $row = mysql_fetch_assoc($r);

                        do {
                                                echo '<p><a name="' . $row['name'] . '"><b>' . $row['name'] . '</b></a><br />
 <img src="./images/phones/thumbs/tn_' . $row['image'] . '" /><br />
 ' . $row['body'] . '<br /></p>';
                        } while ($row = mysql_fetch_assoc($r));
                        mysql_close();
} while ($phone_man_row = mysql_fetch_assoc($phone_man_r));
***********************************************************

And its basically not working.. I dont know if I can have a do{}while win another one?

Thanks for any assistance.

Christian
[+][-]12/26/04 06:43 PM, ID: 12904710Expert 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.

 
[+][-]12/26/04 06:47 PM, ID: 12904712Author 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.

 
[+][-]12/26/04 06:49 PM, ID: 12904715Expert 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.

 
[+][-]12/26/04 06:58 PM, ID: 12904736Expert 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.

 
[+][-]12/26/04 06:59 PM, ID: 12904738Expert 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.

 
[+][-]12/26/04 07:00 PM, ID: 12904739Expert 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.

 
[+][-]12/26/04 07:08 PM, ID: 12904761Expert 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.

 
[+][-]12/26/04 07:17 PM, ID: 12904775Expert 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.

 
[+][-]01/03/05 09:22 PM, ID: 12949840Author 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.

 
[+][-]01/03/05 09:53 PM, ID: 12949935Expert 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.

 
[+][-]01/03/05 10:11 PM, ID: 12949986Author 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.

 
[+][-]01/03/05 10:26 PM, ID: 12950035Expert 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.

 
[+][-]01/03/05 10:36 PM, ID: 12950058Author 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.

 
[+][-]01/03/05 10:38 PM, ID: 12950062Expert 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.

 
[+][-]01/03/05 10:48 PM, ID: 12950098Author 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.

 
[+][-]01/03/05 10:51 PM, ID: 12950107Expert 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.

 
[+][-]01/03/05 10:56 PM, ID: 12950124Author 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.

 
[+][-]01/03/05 11:08 PM, ID: 12950160Accepted 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

Zone: PHP and Databases
Tags: within
Sign Up Now!
Solution Provided By: ldbkutty
Participating Experts: 2
Solution Grade: A
 
[+][-]01/04/05 01:15 AM, ID: 12950616Author 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.

 
[+][-]01/04/05 01:22 AM, ID: 12950648Expert 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.

 
 
Loading Advertisement...
20091021-EE-VQP-81