Jump to content

dbradbury

Members
  • Posts

    177
  • Joined

  • Last visited

    Never

About dbradbury

  • Birthday 01/29/1989

Profile Information

  • Gender
    Male

dbradbury's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. i got it working i sued CURDATE() in my query with plain less than(<) and greater than (>), but no i think the timezone is set wrong.. how would i change this?? i need it to me GMT, thanks in advanced
  2. i meant $getbookings = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id=17 AND post_subject < CURDATE() ORDER BY post_subject ASC");
  3. done i used CURDATE() so it was: $getbookings = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id=17 AND post_subject <= '$date' ORDER BY post_subject ASC");
  4. done i used CURDATE() so it was: $getbookings = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id=17 AND post_subject <= '$date' ORDER BY post_subject ASC");
  5. i need to select all posts in a forum that were posted previous to 'todays date' <- obviously changing daily.... note that the subject of the posts will be date format of YYYY/MM/DD (Y/m/d) i have something like $getbookings = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id=17 AND post_subject <= '$date' ORDER BY post_subject ASC"); but think i need to add a date variable declaring todays date..?
  6. thanks for you help would i need to set $date to todays date? $date = date('Y/m/d') NOW(); or something?
  7. if so how would they be used in a mysql query?
  8. i tried > and < but would work very well.. include("connect.php"); $getbookings = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id='17' ORDER BY post_subject ASC AND post_subject > $date"); just so you know.. that post subjects are dates formatted YYYY/MM/DD.. so they can be sorted. and i would like this code to select a the ones that are greater than or less than todays date.. can someone help me please? thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.