function get_delete_sql($table, $whereCols, $data) { return "DELETE FROM `{$table}` WHERE " . get_sql_columns_string($whereCols, ' AND '); }
function dahlen_image_update_slideshow_image($image, $slideshowID) { $cols = dahlen_image_get_image_columns($image); $sql = "UPDATE `SlideshowImage` SET " . get_sql_columns_string($cols) . " WHERE `ZenphotoID`={$image['ZenphotoID']} AND `SlideshowID`=" . intval($slideshowID); return db_execute($sql); }