lindm
06-10-2008, 06:13 PM
I have a couple of fields in a mysql database beginning with cx. I want to erase all these at the same time. Instead of the following:
mysql_query(
"UPDATE table SET
cx1 = '',
cx2 = '',
cx3 = '',
cx4 = '',
cx5 = '',
");
is there a short script solution that will do this for me without having to name all the fields? Perhaps a script that will search the table for all fields beginning with cx and create the query above?
Thanks
mysql_query(
"UPDATE table SET
cx1 = '',
cx2 = '',
cx3 = '',
cx4 = '',
cx5 = '',
");
is there a short script solution that will do this for me without having to name all the fields? Perhaps a script that will search the table for all fields beginning with cx and create the query above?
Thanks