#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    5
    Rep Power
    0

    Question Retrieving multiple rows


    hello,

    i need your help to my question:

    i have this database called test, and i have a table called data. The table structure is as follow

    cID SMALLINT
    bID SMALLINT
    name TEXT
    email TEXT
    site TEXT

    bID is always an unique number for each row, while cID sometimes has same numbers in 2 or more rows. Example:

    cID = 1
    bID = 1
    name = ss
    email = ss
    site = http://ss

    cID = 1
    bID = 2
    name = ss
    email = ss
    site = http://ss

    bID often differs. My question is see i want to SELECT all the rows that are the same cID. Normally i use:

    SELECT * from data where cID = 1

    but in this case there are more than 1 same values for cID. Is there anyway to retrieve the datas from multiple rows at the same time, and then put all the datas and values to arrays. For instance, in my mind it will be someone like:

    test[0] = cID test[1] = bID
    test2[0] = cID test2 [1] = another bID



    SQL Experts here, Any ideas? Thank you in advance for your help.

    Vincent
    Last edited by Entemedia; September 27th, 2001 at 09:53 PM.
  2. #2
  3. No Profile Picture
    Canta como rafaé
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Barcelona
    Posts
    74
    Rep Power
    14

    Incredible


    Please see the manual of the language you are working in. Or you can read some examples, but I have to tell you that, if doing queries is the first step to database access, the second is to retrieve data.
    Thrasher



    'Y se ahogaron los dooos
    No eran duros pa pagar, cuñaaoo !!'
    El vagamundo - El risitas y su cuñao

IMN logo majestic logo threadwatch logo seochat tools logo