RE: [PHP-DB] strtotime function works only once
| From: | Sanders, Nicholas | Date: | Thu, 02 Nov 2000 10:04:10 +0000 |
| Subject: | RE: [PHP-DB] strtotime function works only once | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4124@lists.php.net to get a copy of this message | ||
This is probably a bug in mssql.dll, I would advise using ODBC as alot more
stable.
-----Original Message-----
From: Leila Raffin [mailto:lraffin@ubisoft.co.ma]
Sent: 01 November 2000 15:21
To: php-db@lists.php.net
Subject: [PHP-DB] strtotime function works only once
Hi,
Could someone help me with the function strtotime ? When I use it only once,
it works fine and I've got the result I need. But if I include it in a loop,
I have an internal error message: "The server encountered an internal error
or misconfiguration and was unable to complete your request".
This works fine:
If ($row = mssql_fetch_array($sql_result)) {
$Vac_Begin_Date = date ("d M Y", strtotime($row["VacBeginDate"]));
$Vac_End_Date = date ("d M Y", strtotime($row["VacEndDate"]));
}
This doesn't work:
while ($row = mssql_fetch_array($sql_result)) {
$Vac_Begin_Date = date ("d M Y", strtotime($row["VacBeginDate"]));
$Vac_End_Date = date ("d M Y", strtotime($row["VacEndDate"]));
}
I have Apache with PHP 4.0.2 and MS SQL Server on Windows NT.
Any idea ?
Leila.