php - TV Guide script - getting current date programmes to show -


This is part of my TV Guide script:

  // Connect to database mysql_connect ("Local host", "root", "password"); // DB select mysql_select_db ("mytvguide"); // The result of results for today and future only = mysql_query ("Select Program, Channel, Episode, Airdate, Termination, Terminal FOm Medium Where Airdate" = Now () ");  

Episodes are shown, so there is no problem there.

If I add a record for a program that shows this evening then it should be shown:

  Media shown on TV 4 8: Episode 30 "episode "Set reminder medium-looking TV4 May 18:25 -" Episode 2 "TV shows" Reminders Medium "set episode 3" set on episode 3 "- May 10, 10:25 pm Show Reminders Show on TV May 19 - 7:30 Show reminder medium set for "Episode 3" TV May 20 - 1:25 am "Episode 3 "Reminder set on TV shows moderate 20 May - 6:25 pm" Episode 4 "set reminder  

but it shows instead:

  TV The medium shown on May 18 - 6:25 pm "Episode 2" shows the reminder medium shown on TV May 18 - 10:25 pm "Episode 3" TV showing reminder media on May 4: 19-7: 30 Showing afternoon "Episode 3" set reminder on Media TV 4 May 20:25 - 1:25 pm "Episode 3" TV on May 4, 20:25 - 6:25 pm T reminder medium run "Episode 4" Set reminder  

I have been around SQL job; Not sure what the right code is, to avoid showing another mistake - as the record (which shows that the show is currently being broadcasted) does not currently work.

Please someone can help me with this?

Thanks

I do not know, but I think there is something that It's strange about the way you are storing your date and time in the Airdate column. Try running a query in this way so that you can do the same comparison which you are asking to do the database:

  Select Now (), Airdate from middle position where episode = Episode ' 

Comments