is there an if statement when it comes to mysql query statements?
when i am updating a table record, i want to only update certain columns if they have a value to be updated.
for example, i want an update table function, and there is a table for volunteers and a table for people who just want email updates.
i want to use the same function (there will be a function that only deals w/ the upd queries) and is it possible to do this in theory...
if you are updating volunteer table, only update these columns, if mailing_list, then update these
i know this can by done using an if statement w/ two query statements, based on what table you're updating, but i am wondering is it possible to use only one query statement w/ the conditionals in it to update the appropriate columns in the table.
this may sound like something you would dream about, let me know.
thanks.