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

    Join Date
    Jul 2000
    Posts
    12
    Rep Power
    0
    I have a this table,it is a train time table.
    It format is the following:

    id train_number train_name station_name start_time stop_time
    1 T83 dalian--beijing dalian 13:40 --
    2 T83 dalian--beijing jinzhong 14:10 14:00
    3 ... ... .. ....
    .. ...
    10 T84 beijing--dalian jinzhong 8:20 8:10
    11 T84 beijing--dalian dalian -- 9:00

    This tables have 80,000 recorders,the same train line have out and home train_number.

    I need query any two stations time,i declare $name1,$name2 .

    How to use PHP to query these quickly?

    Thanks!

  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    I would make more tables!

    your table has alot of redudancy! the train name for example! Redudancy should be avoid in a database!

    laterz

    ------------------
    Quote the Dokus:"NeverMore!"

Similar Threads

  1. Replies: 4
    Last Post: February 27th, 2004, 05:06 PM
  2. Replies: 3
    Last Post: February 17th, 2004, 11:08 AM
  3. League table problem
    By silverduck in forum MySQL Help
    Replies: 8
    Last Post: February 10th, 2004, 01:38 PM
  4. populating table using another table and query
    By wombatwoo in forum PHP Development
    Replies: 0
    Last Post: February 9th, 2004, 06:24 AM
  5. multiple table query
    By thestillman in forum MySQL Help
    Replies: 5
    Last Post: February 4th, 2004, 06:19 PM

IMN logo majestic logo threadwatch logo seochat tools logo