need php & mysql help quick :)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dawgy
    Confirmed User
    • Jul 2001
    • 5856

    #1

    need php & mysql help quick :)

    ok lane is aparently off in the corner wacking off, so is there anyone else here who can help me with a php & mysql question?

    basically:

    i want to read from a table and display the results in 3 columns. the thing is the table will not always have same number of rows, so i dunno how many to put in each column...

    i know there is some way to do this i just cant find it...

    help?!
    the revolution is coming.
  • Theo
    HAL 9000
    • May 2001
    • 34515

    #2
    lane got an overdose of food.....

    Comment

    • Jade
      Confirmed User
      • Jun 2001
      • 329

      #3
      Here is an example of generating a table based on a query to a mysql database using php:

      PHP Code:
          echo "<TABLE>";
          echo "<TR><TH>Username</TH><TH>Expiration Date</th><TH>Subid</TH><TH>Sub</th></tr>";
          
      while ($row = mysql_fetch_array($result)) {
          $username = $row['username'];
          $active = $row['active'];
          $expirationtime = $row['expirationtime'];
          $email = $row['email'];
          $subid = $row['subid'];
          $sub = $row['sub'];
      
      echo "<TR><TD>$username</TD><TD>$expirationtime</TD><TD>$subid</TD><TD>$sub</TD></tr>";
      
      }
      echo "</table>"; 
      
      Hope that helps!
      Last edited by Jade; 02-16-2002, 10:54 PM.

      Cum see me at http://BlowjobJade.com

      Comment

      • [Labret]
        Registered User
        • May 2001
        • 10945

        #4
        Look at that. 2nd post and someone actually gave you help and not 36 replies of dribble about crabs, sodomy, or whos dialer hold the longest. Has to be a GFY record.

        Comment

        • Dawgy
          Confirmed User
          • Jul 2001
          • 5856

          #5
          Originally posted by [Labret]
          Look at that. 2nd post and someone actually gave you help and not 36 replies of dribble about crabs, sodomy, or whos dialer hold the longest. Has to be a GFY record.
          no shit. i almost feel cheated.
          the revolution is coming.

          Comment

          Working...