Following select statement works OK on Localhost, OK within Dreamweaver test, OK on phpmyadmin on site, BUT NOT OK on webpage.
It's the IF part where it states if(m.matchtypeid < 3, etc.... Here on the webpage itself it shows the 'in-/uitschrijven' or 'gesloten' bit on those lines where it shouldn't , and just can't figure out why, they do not show when testing with sqlyog on local pc, within dreamweaver mx test module, withing phpmyadmin on site. STRANGE STRANGE!!! Any brains around who can help me please! Thanks, Martin SELECT distinct m.id, m.naam, left(m.startingtime,5) as starttijd , if(isqualifying,'Ja','') as Q, date_format(playingdate,'%d-%m') as datumpje, mt.naam as soort, if(playingdate < FROM_DAYS( TO_DAYS( NOW( )) + 21), if(m.matchtypeid < 3 , if(playingdate > FROM_DAYS( TO_DAYS( NOW( )) + 9) , 'in-/uitschrijven' , 'Gesloten' ) , '' ) , '' )as inschrijven, if(f.matchid = m.id, 'Startlijst', if(wi.zoekcode='$details[1]','Ingeschreven', date_format(if(playingdate < FROM_DAYS( TO_DAYS( NOW( )) + 9), '', FROM_DAYS( TO_DAYS( playingdate ) -21)),'%d-%m'))) as enu FROM match1 as m left outer join matchtype mt on mt.id = m.matchtypeid left outer join flight f on f.matchid = m.id left outer join wedstrijdinschrijvingen wi on wi.matchid = m.id and wi.zoekcode='$details[1]' WHERE playingdate > ( NOW( )- 3 ) ORDER BY playingdate -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php