Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    How do you query multiple records from a MySQL table, so that you would have an html table of all of the info from particular rows, as vBulletin does with the Member List?
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    If you mean multiple columns (I'm an idiot when it comes to databases other than MySQL):
    Code:
    SELECT column1, column2, column3 FROM tablename WHERE condition
    Then mysql_fetch_row will return an array where index 0 is column1, etc.

    If you mean multiple rows, then the query syntax is the same, you just keep calling mysql_fetch_row until it returns false.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Member inthezone's Avatar
    Join Date
    Sep 2002
    Posts
    59
    Member #
    192
    Originally posted by filburt1
    If you mean multiple columns (I'm an idiot when it comes to databases other than MySQL):
    Code:
    SELECT column1, column2, column3 FROM tablename WHERE condition
    Then mysql_fetch_row will return an array where index 0 is column1, etc.

    If you mean multiple rows, then the query syntax is the same, you just keep calling mysql_fetch_row until it returns false.
    I mean multiple fields, if that clears it up a little.
    The Extent of my PHP Knowledge:

    <?php
    print "In the Zone";
    ?>

  5. #4
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Hi,

    Fields and Columns are the same thing. The syntax will be same as filburt suggested.

    For example, if you have a table with fields Username and password. then you will select them using:

    Code:
    SELECT username, password FROM tablename WHERE condition
    There and Back Again :Ogre:


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com