Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to have something delete or not display after todays date?
Old 04-28-2009, 10:38 AM How to have something delete or not display after todays date?
Extreme Talker

Posts: 176
Name: Aaric
Trades: 0
Is this possible?

I started working on this: http://ghastlycitysleep.com/index.php

I have a form where this band can enter info on their concerts and then it will be displayed in order on the site starting w/the earliest dated show. Well if they played yesterday, that info doesn't need to be on there anymore. Is there a way to have it display everything THAT DAY and after?

I hope I worded this in a way you can understand. I am still learning.
aaricwon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-28-2009, 10:52 AM Re: How to have something delete or not display after todays date?
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
yes it is possible. but can you provide more information. like how you store the date in your database? in a timestamp or as it is?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 04-28-2009, 10:52 AM Re: How to have something delete or not display after todays date?
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Yes, if you pull the data from a MySQL database with something like

Code:
SELECT * FROM `concerts` WHERE `date` > CURDATE();
http://dev.mysql.com/doc/refman/6.0/en/select.html < check here for more details.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-28-2009, 11:12 AM Re: How to have something delete or not display after todays date?
Extreme Talker

Posts: 176
Name: Aaric
Trades: 0
I can't get in to see how I have it set up. I THINK it is As Is.

Can I leave it that way and still do what I am trying to do or do I need to change it?
aaricwon is offline
Reply With Quote
View Public Profile
 
Old 04-28-2009, 12:39 PM Re: How to have something delete or not display after todays date?
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
Quote:
Originally Posted by aaricwon View Post
I can't get in to see how I have it set up. I THINK it is As Is.

Can I leave it that way and still do what I am trying to do or do I need to change it?
no you don't need to change. you will just need to write the query depending on the way you use.

if you use timestamp your code should be
Code:
SELECT * FROM `concerts` WHERE `date` > CURRENT_TIMESTAMP();
if you use date as it is, then you should use the code rogem002 had written. it should work
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");

Last edited by nayes84; 04-28-2009 at 12:43 PM..
nayes84 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to have something delete or not display after todays date?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22555 seconds with 12 queries