We help IT Professionals succeed at work.
Get Started

How to insert this data in one new table

syedasimmeesaq
on
248 Views
Last Modified: 2013-12-13
I am showing the data to my visitors by selecting it from different tables. Now what I want to do is to transfer this data into one table exactly as it is presented to the visitors. How can I do that. Please find my code below to show the data to visitors. Thanks
<?php include('column.php') ?>
<body>
<table width="1954" border="2">
  <tr>
    <td width="213">&nbsp;</td>
    <td width="248">Question1</td>
    <td width="289">Question2</td>
    <td width="289">Question3</td>
    <td width="289">Question4</td>
    <td width="289">Question5</td>
    <td width="289">Question6</td>
  </tr>
  <tr>
    <td><strong>17266408</strong></td>
    <td>
    <?php $qu = "Select 79666X451X4679 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?>    </td>
    <td><?php $qu = "Select 79666X451X4680 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 79666X451X4681 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 79666X451X4682 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 79666X451X4683 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 79666X451X4684 from survey_79666";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
  </tr>
  <tr>
    <td><strong>18704956</strong></td>
    <td><?php $qu = "Select 64468X447X4655 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 64468X447X4656 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 64468X447X4657 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 64468X447X4658 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 64468X447X4659 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
    <td><?php $qu = "Select 64468X447X4660 from survey_64468";
 
$result = mysql_query($qu);

while($row = mysql_fetch_array($result))
{
    echo "{$row[0]} <br>" ;
}

?></td>
  </tr>
  Thanks in advance
Comment
Watch Question
Developer | Solutions Architect | CTO
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 15 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE