where = []
if username:
where.append("username = '%s'" % username)
if email:
where.append("email = '%s'" % email)
if id:
where.append("id = '%s'" % id)
...
whereString = "WHERE " + " AND ".join(where);
where = []
where.append("1 = 1")
if username:
...
INSERT INTO RECIPE(recipe_id) VALUES('123','asp','McDonald's','c_t_m')