Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
fury
Worker
Worker



Joined: Sep 09, 2003
Posts: 165

PostPosted: Mon Nov 15, 2004 8:09 pm Reply with quote

I am working on a company database that is webbased
So far i got it to work but only displays 1 record

Code:
$result = mysql_query("SELECT * FROM `customers` WHERE `Name`", $connection);

      echo "<TABLE BORDER=1>";
       echo "<TR><TH>NAME<TH>ADDRESS<TH>CITY<TH>TOWER<TH>TOWER SECTOR<TH>CPE MAC";

       /* format results by row */
       while ($row = mysql_fetch_array($result)) {
           $nam = $row["Name"];
      $add = $row["Address"];
      $cit = $row["City"];
      $tow = $row["Tower"];
      $tsa = $row["Tower Sector Abbrev"];
      $cpemac = $row["CPE MAC"];
          echo "<TR><TD>$nam<TD>$add<TD>$cit<TD>$tow<TD>$tsa<TD>$cpemac";


This is what i have so far it does what it is suppose to do but doesnt display more than 1 record not sure where to go from here. I want it to show all the records there is about 1200 of them
Thanks
Rick
 
View user's profile Send private message
fury







PostPosted: Mon Nov 15, 2004 8:45 pm Reply with quote

I figured it out


Before


Code:
$result = mysql_query("SELECT * FROM `customers` WHERE `Name`", $connection); 

      echo "<TABLE BORDER=1>";
       echo "<TR><TH>NAME<TH>ADDRESS<TH>CITY<TH>TOWER<TH>TOWER SECTOR<TH>CPE MAC";

       /* format results by row */
       while ($row = mysql_fetch_array($result)) {
           $nam = $row["Name"];
      $add = $row["Address"];
      $cit = $row["City"];
      $tow = $row["Tower"];
      $tsa = $row["Tower Sector Abbrev"];
      $cpemac = $row["CPE MAC"];
          echo "<TR><TD>$nam<TD>$add<TD>$cit<TD>$tow<TD>$tsa<TD>$cpemac";


After

$result = mysql_query("SELECT * FROM `customers` WHERE 1", $connection);
      echo "<TABLE BORDER=1>";
       echo "<TR><TH>NAME<TH>ADDRESS<TH>CITY<TH>TOWER<TH>TOWER SECTOR<TH>CPE MAC";

       /* format results by row */
       while ($row = mysql_fetch_array($result)) {
           $nam = $row["Name"];
      $add = $row["Address"];
      $cit = $row["City"];
      $tow = $row["Tower"];
      $tsa = $row["Tower Sector Abbrev"];
      $cpemac = $row["CPE MAC"];
          echo "<TR><TD>$nam<TD>$add<TD>$cit<TD>$tow<TD>$tsa<TD>$cpemac";


Sorry

posted this for future reference

Thanks
Rick
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©