Jump to content

only show event is day had not passed (hard)


Rifts

Recommended Posts

hey guys

 

so I have this code:

$result = mysql_query("SELECT * FROM pec_mssgs  ORDER BY (y / m) DESC, d ASC");

										while($row = mysql_fetch_array($result))
										  {
										  
										  
												echo "•<a style='text-decoration: underline; font-weight: bold;' href='../index?id=".$row['id']."'>". $row['m']."/".$row['d']."/".$row['y'] . "  -  ".$row['title']."</a>";
												echo "<br /><br />";


										  }

 

in my database instead of doing date I have 3 rows d, m, y, which correlate to day, month, year.

 

now currently its echo out a list and sorting by year then month then day this way the events which are happening soonest will be at top.

 

the problem is it shows events that has already passed.

 

what do I do?

 

It will be way to much work to to back and recode the application to just use date.

 

is there a way I can create a var. using my d/m/y then compare that var. to the current date or something?

 

thanks for the help.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.