[eluser]George36[/eluser]
Hi There,
I'm using the
db->insert('tablename', $data); function to add XML data to a database.
Sometimes, however, an XML field does not contain any data, so it results in an INSERT statement that may look like this:
Code:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, , value3,...)
Ideally, it would look like this:
Code:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1,'' , value3,...)
Do I need to test each value to check it for null data before I build the data array, or is there a better way?
Many thanks
George