query($sql_nota); $data = $tmp->fetchAll()[0]; if ($tmp->numRows() > 0){ $cetak = $data['cetakan_nota'] + 1; $query = "UPDATE order_poct SET cetakan_nota = {$cetak} where no_nota = '".$id."' "; $execute_poct = execute($query); } }