Calendar of sorts - Please Help

Codes here !

Moderators: macek, egami, gesf

User avatar
digitalgravy
New php-forum User
New php-forum User
Posts: 32
Joined: Sat Feb 15, 2003 10:00 pm
Location: Los Angeles, CA
Contact:

Calendar of sorts - Please Help

Postby digitalgravy » Sat Feb 15, 2003 10:11 pm

I have a mysql database setup with information on upcomming events for an organization I am a member of. I know how to connect to the database, and display info from it using php. What Im trying to do is have a section on the site where it will show the next event for different categories.
How can I specify in my php code to display the next event in a category in relation to the current date?

Please help
-Jacob

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Sun Feb 16, 2003 10:10 am

An example contrasting two dates:

Code: Select all

echo ( strtotime ("10 September 2003") - strtotime ("now") );

Implement it in your script.
Bye!
Last edited by Joan Garnet on Thu Feb 20, 2003 2:16 am, edited 1 time in total.

User avatar
digitalgravy
New php-forum User
New php-forum User
Posts: 32
Joined: Sat Feb 15, 2003 10:00 pm
Location: Los Angeles, CA
Contact:

Postby digitalgravy » Tue Feb 18, 2003 5:12 pm

Thanks, although I found another way that works.
It is: now()

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Thu Feb 20, 2003 2:15 am

There should be a thousand ways :D
That one sounds good anyway ;)

bye!


Return to “mySQL & php coding”

Who is online

Users browsing this forum: biglittle and 2 guests