TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-27-2009, 12:46 PM   #1 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 11
Thanks: 4
dodgeqwe is on a distinguished road
Default please help me

hi friends,

im a newbie developing a library management app, i need below functionality


1. Issued books and returned books details (date of issue,return) these details must be deleted automatically from issued books table automatically after 31 days.i want these details store only one month.

2.is there a way to calculate no. of days between dates accurately (feb 28.. ,leapyear issues) i want this to notify users how many days left to return book.

thankyou
dodgeqwe is offline  
Reply With Quote
Old 06-27-2009, 12:56 PM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Have you had an attempt at writing this? Could we see your code, please?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
dodgeqwe (06-27-2009)
Old 06-27-2009, 01:00 PM   #3 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 11
Thanks: 4
dodgeqwe is on a distinguished road
Default

no wild honey, im planning.
dodgeqwe is offline  
Reply With Quote
Old 06-27-2009, 01:01 PM   #4 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 11
Thanks: 4
dodgeqwe is on a distinguished road
Default

what i mean by no is i didnt write code, i need suggestions how i can add functionality
dodgeqwe is offline  
Reply With Quote
Old 06-27-2009, 01:31 PM   #5 (permalink)
The Wanderer
 
Join Date: Jun 2009
Posts: 11
Thanks: 4
dodgeqwe is on a distinguished road
Default

i think every one is too busy to answer my question.
dodgeqwe is offline  
Reply With Quote
Old 06-27-2009, 04:19 PM   #6 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

1) This is not IM, people won't respond within the hour.
2) You should make a list of the things you want it to do.
2.1) Then draw up a flow chart of the program
2.2) Write (not type) some sample code to get a flow going
2.3) Code the program bit by bit. (No pun intended)

It's a rough guide line that I follow, maybe it will help you.
__________________
My Site
adamdecaf is offline  
Reply With Quote
Old 06-27-2009, 05:07 PM   #7 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

We appreciate that you need help, but we do like to see people attempting to solve a problem on their own first. Please consider this in the future.

Nonetheless, your second question is a pretty fair question, although I would have liked to have seen you made an attempt at that, too.

1) Use a crontab.
2) ...

php Code:
$iRightNow  = time();
$i30DaysAgo = strtotime('-30 days');
$iInterval  = $iRightNow - $i30DaysAgo;

printf('Days: %d', ($iInterval / 3600) / 24);
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


All times are GMT. The time now is 07:34 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design