kiml Posted February 10, 2007 Share Posted February 10, 2007 Hey folks. I need help making a function to print up the nearest route comparing to current time. I have 3 values in my SQL that may be of your interest -> ID, deparure_time and departure_minuttes. They are saved like -> 236, 12, 21 I have allredy maked the basic in the code $Route = "SELECT * FROM Ruter WHERE DepartureID = '$Neste_flyvning_dep' AND ArrivalID = '$Neste_flyvning_arr' AND FlyType = '$Flytype_pilot' LIMIT 1"; $Rtr = mysql_query($Route) or die ("Cant run logg". mysql_error()); while ($FlightnrQ = mysql_fetch_array($Rtr)) { Print "<b>$FlightnrQ[RuteNr]</b> - Departure $FlightnrQ[departure_time]:$FlightnrQ[departure_minutt]<br>"; } But I need some help to view only the next route. Somebody who know how to do this stuff? Link to comment https://forums.phpfreaks.com/topic/37890-help-with-time/ Share on other sites More sharing options...
only one Posted February 10, 2007 Share Posted February 10, 2007 can you explain what you mean by route? Link to comment https://forums.phpfreaks.com/topic/37890-help-with-time/#findComment-181402 Share on other sites More sharing options...
only one Posted February 10, 2007 Share Posted February 10, 2007 i think i know what your doing, you making like a traveling thing Link to comment https://forums.phpfreaks.com/topic/37890-help-with-time/#findComment-181403 Share on other sites More sharing options...
only one Posted February 10, 2007 Share Posted February 10, 2007 thats gonna take alot of ifs, i cant think of any other way :-\ Link to comment https://forums.phpfreaks.com/topic/37890-help-with-time/#findComment-181404 Share on other sites More sharing options...
kiml Posted February 10, 2007 Author Share Posted February 10, 2007 Yes, it will be a little traveling thing, I can print all routes but I want only the one which is nearest to departure at current time to be printed.. pretty hard to explain what I mean, but you got it? Link to comment https://forums.phpfreaks.com/topic/37890-help-with-time/#findComment-181438 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.