Dear Daniel,
   Thank you for a response, I will try and let you know.
   
  Kai

Daniel Israel <[EMAIL PROTECTED]> wrote:
          
You can use DATEDIFF with mySQL. For example, presume you have a field in the 
database called
CheckedOut that's the date the book was checked out. When you do your mySQL 
select, do this:

SELECT CheckedOut, DATEDIFF(CURDATE(), CheckedOut) as DaysBorrowed from 
<tablename>

You'll get a field back called DaysBorrowed that is the number of days the book 
has been checked
out.

--- Kaizilege Karoma <[EMAIL PROTECTED]> wrote:

> Dear All,
> I am learning PHP/MySQL, and I am also writting the Library Management System 
> to make sure
> that I practice what I am leaning.
> 
> My Problem is:
> I want to capture the date when the library user borrow the book and then 
> check that date to
> see if the book have exceeded the number of days (to calculate how many days 
> user has stayed
> with the book once she return it). Please help me how I can do that. I am 
> using mysql as my
> database.
> 
> Thanks in advance.
> 
> Kai
> 
> 
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 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
> 
> 
> 
> 
> 

-D. Israel
[EMAIL PROTECTED]
http://www.customcodebydan.com
AIM: JudoDanIzz

Can you name the movie this was in:

'Greater good?' I am your wife! I'm the greatest 'good' you are ever gonna get!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


         

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

[Non-text portions of this message have been removed]

Reply via email to