Required to Trim Variables with MSSQL Module
| From: | Flint Doungchak | Date: | Wed, 02 May 2001 22:59:41 +0000 |
| Subject: | Required to Trim Variables with MSSQL Module | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7231@lists.php.net to get a copy of this message | ||
Hi all,
I've got a rather iritating problem. I recently moved a site from PHP 3.0.11
to 4.0.5 RC1. It seems, and I have noticed this for a while in other
scripts, that variables returned from MSSQL sometimes need to be trimmed
with trim() in order to function correctly.
Sometimes they won't evaluate as integers (i.e. they don't add right), other
times they don't evaluate right as strings (i.e. with if (!$row[crap]), and
other times if I have a header redirect (i.e. Header("Location:
./index.php?crap=$row[crap]") ) I get the infamous CGI header problem.
I generally retrieve with $row = mssql_fetch_array($result);
In all cases adding trim will fix the problem. Anyone had similar problems.
Am I missing something. This seems to be odd behavior. I really don't want
to go through all my scripts and trip stuff.
Thanks,
-Flint