Niel Archer wrote:
> Hi
>
>> OK, so there is no way how to get error message about mysql_connect()
>> function when establishing more connections?
>
> mysql_error *should* hold the error string from the last used mysql
> function (excepting itself and mysql_errno), that includes the
> mysql_connect
I use CalcDateDiff.php class and it works pretty good!
I got it at PHP Classes.org
-Original Message-
From: Nandar [mailto:[EMAIL PROTECTED]
Sent: Jueves, 05 de Octubre de 2006 10:16 p.m.
To: php-db@lists.php.net
Subject: [PHP-DB] Diff between 2 date
How to know diff between 2 date ?
Hi
> OK, so mysql_error is not usable for me in this case.
> Is in PHP any other way how to get error-message from connect function?
> Isn't in PHP any other function, that can be used similiar?
To the best of my knowledge, there is no work around for this situation.
Even the 'Improved' MySQL Ex
I use CalcDateDiff.php class and it works pretty good!
Why use classes for such a simple calculation? It's the matter of 2 rows of code
$dif_sec=mktime(0,0,0,10,6,2006)-mktime(0,0,0,10,5,2006);
echo("diff is ".($dif_sec/(24*60*60))." days");
OKi98
--
PHP Database Mailing List (http://www.php.
I am wondering if someone would help me write a SELECT date query ...
Weekly mailings go out every Wednesday. I am setting up an
administration function and table to store the mailing name, PDF to be
contained within the mailing and the date for it to be used.
The SELECT query I want to create i
Hi Ron
I've made the assumption that if today is Wednesday, you still want next
Wednesday.
Try this:
$offset = array(3,2,1,7,6,5,4);
$date = explode("-", date("Y-n-j"));
$ToDay = DayOfWeek($date[0], $date[1], $date[2]);
$NextWed = date("Y-n-j", time() + ($offset[$ToDay] * 24 * 60 * 60));
// Retu
If you only have Wednesdays in you table - that is select the next 12
records after today it's easy:
SELECT * FROM christian_discipleship WHERE created_for_date > now()
ORDER BY created_for_date ASC LIMIT 12
Good luck,
Frank
On Oct 6, 2006, at 8:29 PM, [EMAIL PROTECTED] wrote:
I am wonderi