| 
	
 | 
 Posted by "Mario netMines" on 06/29/05 14:44 
Isn't DATEDIFF() a MySQL 4.x function? The server I'm using has 3.x and I  
can't upgrade... 
 
----- Original Message -----  
From: "Jasper Bryant-Greene" <jasper@bryant-greene.name> 
To: <php-general@lists.php.net> 
Sent: Wednesday, June 29, 2005 7:49 AM 
Subject: Re: [PHP] Re: date problem 
 
 
> Mario netMines wrote: 
>> Hi Jasper and thanks for the quick reply. 
>> 
>> something tells me it's not a straightforward SQL query that I have to 
>> use here but a logic using PHP and SQL. 
> 
> Please don't top-post. 
> 
> It can be done in SQL quite easily, as can many things people use PHP 
> for. Go to the MySQL manual at http://dev.mysql.com/ and read up on 
> Date/Time functions, specifically the DATEDIFF() function. IIRC, it 
> returns the difference between two dates. 
> 
> You can perform many types of arithmetic on the return value of the 
> function which should help to get the result you want. Try the MySQL 
> mailing lists if you can't figure it out, or if you're completely stuck 
> and are *convinced* it's a PHP problem (which I doubt, but I could be 
> wrong) then by all means come back! 
> 
> Cheers 
> 
> Jasper 
> 
> --  
> PHP General Mailing List (http://www.php.net/) 
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
>
 
  
Navigation:
[Reply to this message] 
 |