We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    I have a query :
    $sql = "
    SELECT t1.id, t1.datum, t1.achternaam, t3.naam AS activiteit 
    FROM ".PREFIX."inschrijvingen AS t1, ".PREFIX."kampen AS t2 
    INNER JOIN ".PREFIX."activiteiten AS t3 
    ON t3.id = t1.kampid AND t3.id = t2.kamp_id 
    WHERE t1.verwijderd = '0' AND t1.oud = '0' AND t1.kampid = '".$kamp."' 
    ORDER BY t1.datum DESC";
    
    that worked on php4 and mysql 3.25 but fails on php 5 and mysql 5
    I get the folloing error:
    
    Unknown column 't1.kampid' in 'on clause'
    but t1.kampid is an existing column
    
    does any one know what this could be or how I could get the same results with another SELECT?
    
    Dimmy
      follow me on twitter: @dimmy01
      • 7455
      • 2,204 Posts
      the query you showed here works, thank you
      but where is the inner join? or is this not needed? if not why is there a inner join option?

      dimmy
        follow me on twitter: @dimmy01