<?php 
include '../config.php';

$query = $db->query("SELECT * FROM odemeler", PDO::FETCH_ASSOC);


foreach ($query as $veri) {
	$idim = $veri['user_id'];
	$query = $db->query("SELECT * FROM kullanicilar WHERE id = '{$idim}'")->fetch(PDO::FETCH_ASSOC);

if(isset($query['user_id'])){

	echo "Bu => ".$idim. " --->> Bu Olacak => " .$query['user_id'];
	echo "<br>";



$queryx = $db->prepare("UPDATE odemeler SET
user_id = :yeni_kadi
WHERE user_id = :eski_kadi");
$update = $queryx->execute(array(
     "yeni_kadi" => $query['user_id'],
     "eski_kadi" => $idim
));




}

}