ayooshkasmth — 2010-09-25T08:59:46-04:00 — #1
Hi, i have a php table with 7 rows, which sometimes are not all required. Is it possible to do a conditional insert if fields not empty?
At the moment all 7 rows are inserted regardless of whether only 1 or 2 rows are filled.
guido2004 — 2010-09-25T09:18:39-04:00 — #2
Do you mean a MySQL table?
Do you mean columns?
ayooshkasmth — 2010-09-25T11:38:00-04:00 — #3
LOL :S - yeah, sorry. I obviously need some sleep.
guido2004 — 2010-09-25T16:06:40-04:00 — #4
When you insert a row in a table, all columns are inserted. Of course, not all columns have to have a "meaningful" value, they may be NULL or spaces or zero.
ayooshkasmth — 2010-09-25T16:52:07-04:00 — #5
Thanks. I am filtering !=' ' from the results, so nearly what i wanted.