[geeklog-devel] Fwd: MSSQL Class - SQL Coding
Joe Mucchiello
joe at ThrowingDice.com
Sat May 30 15:29:09 EDT 2009
>Note that '' (single quotes with nothing between them) does not
>represent NULL in SQL Server. The triggers I've implemented are to
>cleanse any data that appears to be NULL and replace the empty
>VARCHAR data with NULL. This way, when PHP tests empty() on a
>column, it returns empty properly.
I don't understand this. empty($var) returns true if $var is '', 0,
"0", 0.0, false, array(), or null. Why do you need to do this? Are
you talking about on the way into SQL Server or on the way out?
>Use of the array notation (see above) is recommended instead of
>checking the content of $_DB_dbms when writing DBMS-specific SQL request.
I still don't like this for one reason. The code for both (and soon
all three) array values executes but only one of the results is
needed. This is the other reason I think a set of functions would work better.
----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com
No virus found in this outgoing message
Checked by PC Tools AntiVirus (6.0.0.19 - 10.004.038).
http://www.pctools.com/free-antivirus/
More information about the geeklog-devel
mailing list