TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   please help me (http://www.talkphp.com/absolute-beginners/4626-please-help-me.html)

dodgeqwe 06-27-2009 12:46 PM

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

Wildhoney 06-27-2009 12:56 PM

Have you had an attempt at writing this? Could we see your code, please?

dodgeqwe 06-27-2009 01:00 PM

no wild honey, im planning.

dodgeqwe 06-27-2009 01:01 PM

what i mean by no is i didnt write code, i need suggestions how i can add functionality

dodgeqwe 06-27-2009 01:31 PM

i think every one is too busy to answer my question.

adamdecaf 06-27-2009 04:19 PM

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.

Wildhoney 06-27-2009 05:07 PM

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);


All times are GMT. The time now is 06:23 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0