In message <[EMAIL PROTECTED]>, zia Rehman <[EMAIL PROTECTED]> writes > >Dear friends! >I am new in PHP and MYSQL.I am developing Library managment system.I am facing >problem in coding. >I want to calculate and update Fine of Library members on daily basis. >My Database contains two columns .1. Issue Date and Due Date. >I want to fine member at $2 per day after due date. >I don't understand how to write code for that.Kindly if someone help me and >write exact code. >I have two options >1.Wether librarian clcik on button to activate fine status of all members >2.Librarian open admin view and fine status are updated automatically.
Surely you only need to update the fine status when you need information about the book loan - as in, when the book is returned, or when a reminder is issued. So when the book is returned, and you need to know what the fine is, then something like SELECT DATEDIFF(CURDATE(),DueDate)* 2 AS finedue FROM library WHERE loanID= thisloanID would do it This is just a guess, to suggest a direction to you - try it and fix it up. -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
