MySQL Forums
Forum List  »  MyISAM

Re: seeks function: copy complete field from tableA to tableB
Posted by: Jeff Sabarese
Date: December 30, 2005 03:32AM

hmm... i thank you for your help, but i really am not picking up on your advice. could you please try to re-explain?

darn-- i would think this is like MySQL UPDATE syntax 101 or alter table 101... haha, but i'm having one of those brain f#rt days!

basically, what i'm trying at this point is

$hstops = array("hc131a", "hc131b", "h27", "h28", "h29", "h30", "h31", "h32", "h33", "h34", "h34a", "h34b", "h34c", "h35", "h36", "hc123b", "h36aa", "hc138", "hc140", "hc141", "h198aa", "hc198a", "hc162", "hc100", "hc124", "hc124a", "hc122", "hc103", "hc134", "hc135", "hc136", "hc123", "h123a", "h36d", "h37", "h37aaa", "h37aa", "h37a", "h38", "h39", "h40", "h41", "h42", "h43", "h44", "h45", "hc131c", "hc131d");

foreach($hstops as $key => $val) {
$query = mysql_query("UPDATE h_stops SET stop_code='".$val."' WHERE en_route = '".$key."'");
echo "updated field stop_code row ".$key." in h_stops with the new value of ".$val."<br />";
}

but, again-- i'm having problems-- i thought this was the solution-- can you locate my error?

thanks!

-- -- -- --
Use CSS [ content:" ?? " ] for Unicode + Control Chars (e.g. newline, etc)... Gain understanding of Codepage, Charset, Encoding, Keymapping... Generate CSS and JavaScript on-the-fly with PHP... Tales from the Communications Dept @ NoviceNotes.Net

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: seeks function: copy complete field from tableA to tableB
2347
December 30, 2005 03:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.