Created
September 25, 2012 21:43
-
-
Save ryanneufeld/3784648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$get_ids = $DB_site->query(" | |
SELECT a.id, b.iidd | |
FROM table_b , table_a | |
WHERE table_b.iidd = table_a.iidd | |
AND table_b.id = 0 | |
"); | |
while ($data = $DB_site->fetch_object($get_ids)) | |
{ | |
$DB_site->query("update table_b set id = {$data->id} where iidd = {$data->iidd}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment