You are here: techniques for Inserting DB NULL values (PDO is what i use now for "all" DML) « PHP Programming Language « IT news, forums, messages
techniques for Inserting DB NULL values (PDO is what i use now for "all" DML)

Posted by gp on 09/06/07 15:20

I am and have been using PDO for about a year now...and have finally
gotten around to solving the "DB NULL value" issues I ran into early
on...

I am looking for suggestions and techniques to deal with inserting DB
NULL values into my MySQL 5.x DB Tables....I am running PHP 5.2.x on BSD
6.x with Apache 2.2.x....

As mentioned I am writing all my web apps using the PDO extension to
connect and operate on the database. I realized early on that I was
inserting "NULL" not NULL into my tables, but never went to do
anything about it because it wasn't affecting me [enough] at the time...
well.....guess what now it is...and I need to solve it...(ie. Go back and
fix all my DML statements where IS NULL or IS NOT NULL or INSERT...
VALUES (NULL) might show up....change all my PDOStatment::bindParam()
calls appropriately or as needed ....write a php function to change
"NULL" to NULL where allowed.)

Aside from updating all records where fieldname = "NULL" to fieldname
= NULL.... I am specifically curious to know how PDO::PARAM_NULL works
in SP's... do I need to catch all values "NULL" and replace them with
something else...like I said earlier..." I am looking for suggestions and
techniques to deal with inserting DB NULL values into my MySQL 5.x DB
Tables..." using PHP 5.2 and when possible the PDO extention.

Thank you,
Max

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация