How to select from more tables.

Discussion in 'PHP' started by tasos55, Apr 15, 2013.

  1. #1
    Hello, i dont know ho to select from more tables.

    How to ad more tables in to this ?
    ("SELECT * FROM tabel_1
    WHERE channel LIKE '%funny%' ORDER BY date DESC  LIMIT $id, $per_page");
    PHP:
    And is this safe ? if not how can i make it safe ?

    Thanks.
     
    tasos55, Apr 15, 2013 IP
  2. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #2
    
    SELECT tabel_1.channel, tabel_2.other_field WHERE table_1.channel LIKE '%funny%' ORDER BY tabel_1.date DESC LIMIT $id, $per_page
    
    PHP:
    You should understand what to do from that code.
     
    HuggyStudios, Apr 15, 2013 IP
  3. tasos55

    tasos55 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Thanks.
     
    tasos55, Apr 15, 2013 IP