<?php
$paraUpadate="";
$colunas="ads_image_1,ads_image_2";
$praBanco="'im/pd/5ad3dd6bd58c86.55498080.jpg','im/pd/5ad3dd6bd5a312.43966416.jp'";
$explodeColunas = explode(',', $colunas);
$explodePraBanco = explode(',', $praBanco);
for($i = 0; $i<count($explodeColunas); $i++){
$paraUpadate .= $explodeColunas[$i]."=".$explodePraBanco[$i].",";
}
//para retirar os 3 caracteres do final da string ,=, ( virgula sinal de igual virgula )
$paraUpadate = substr($paraUpadate,0,-3);
$ads_title="Titulo";
$ads_content="Contentissimo";
$ads_price="Carissimo";
// edit_attempts ?? não seria
$edit_attempts=23;
$editor_id=10;
//agora é só colocar esse resultado na declaração UPDATE
$smtp_process = "UPDATE public_ads SET ads_title = '$ads_title', ads_content = '$ads_content', ads_price = '$ads_price', edit_attempts = $edit_attempts + 1, $paraUpadate WHERE ads_id = '$editor_id'";
echo $smtp_process;
PD9waHAKCiRwYXJhVXBhZGF0ZT0iIjsKIAokY29sdW5hcz0iYWRzX2ltYWdlXzEsYWRzX2ltYWdlXzIiOwogCiRwcmFCYW5jbz0iJ2ltL3BkLzVhZDNkZDZiZDU4Yzg2LjU1NDk4MDgwLmpwZycsJ2ltL3BkLzVhZDNkZDZiZDVhMzEyLjQzOTY2NDE2LmpwJyI7CiAKIAokZXhwbG9kZUNvbHVuYXMgPSBleHBsb2RlKCcsJywgJGNvbHVuYXMpOwogCiRleHBsb2RlUHJhQmFuY28gPSBleHBsb2RlKCcsJywgJHByYUJhbmNvKTsKIApmb3IoJGkgPSAwOyAkaTxjb3VudCgkZXhwbG9kZUNvbHVuYXMpOyAkaSsrKXsKIAogICAgJHBhcmFVcGFkYXRlIC49ICRleHBsb2RlQ29sdW5hc1skaV0uIj0iLiRleHBsb2RlUHJhQmFuY29bJGldLiIsIjsKIAp9CiAKLy9wYXJhIHJldGlyYXIgb3MgMyBjYXJhY3RlcmVzIGRvIGZpbmFsIGRhIHN0cmluZyAgLD0sICggdmlyZ3VsYSBzaW5hbCBk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