Asp sql kode til php ?
nogen der kan forklare mig den her kode ?jeg har i min db ikke en onlinetime.
[code]SQLCookie_1 = "select hotbilleder.* from hotbilleder LEFT JOIN profiler ON (hotbilleder.profilerID = profiler.id) where hotbilleder.godkendt = '1' AND profiler.kon = '1' and NOW() >= DATE_ADD(CONCAT(SUBSTRING(profiler.onlinetime,7,4),'-',SUBSTRING(profiler.onlinetime,4,2),'-',SUBSTRING(profiler.onlinetime,1,2),' ',SUBSTRING(profiler.onlinetime,12,8)),INTERVAL 1 MINUTE) ORDER BY RAND()"
SQLCookie_2 = "select hotbilleder.* from hotbilleder LEFT JOIN profiler ON (hotbilleder.profilerID = profiler.id) where hotbilleder.godkendt = '1' AND profiler.kon = '1' and NOW() < DATE_ADD(CONCAT(SUBSTRING(profiler.onlinetime,7,4),'-',SUBSTRING(profiler.onlinetime,4,2),'-',SUBSTRING(profiler.onlinetime,1,2),' ',SUBSTRING(profiler.onlinetime,12,8)),INTERVAL 1 MINUTE) ORDER BY RAND()"[/code]
her er koden fra http://www.resources.fortunedesign.co.uk/jspack/asp2php.html
ved ikke helt med den oversættelse der
[code]SQLCookie_1 = "select hotbilleder.* from hotbilleder LEFT JOIN profiler ON (hotbilleder.profilerID = profiler.id) where hotbilleder.godkendt = '1' AND profiler.kon = '1' and NOW() >= DATE_ADD(CONCAT(SUBSTRING(profiler.onlinetime,7,4),'-',SUBSTRING(profiler.onlinetime,4,2),'-',SUBSTRING(profiler.onlinetime,1,2),' ',SUBSTRING(profiler.onlinetime,12,8)),INTERVAL 1 MINUTE) ORDER BY RAND()"
SQLCookie_2 = "select hotbilleder.* from hotbilleder LEFT JOIN profiler ON (hotbilleder.profilerID = profiler.id) where hotbilleder.godkendt = '1' AND profiler.kon = '1' and NOW() < DATE_ADD(CONCAT(SUBSTRING(profiler.onlinetime,7,4),'-',SUBSTRING(profiler.onlinetime,4,2),'-',SUBSTRING(profiler.onlinetime,1,2),' ',SUBSTRING(profiler.onlinetime,12,8)),INTERVAL 1 MINUTE) ORDER BY RAND()"[/code]