Benvenuto Posted January 11, 2006 Report Share Posted January 11, 2006 Tātad ir sekojoša tabula, kas saucaas BEBRS un sastaav no ID un TEXT laukiem. Katrs ieraksts izskataas apmeeram tā: ID = "1" TEXT = "Bebri ēd zapti" ID = "2" TEXT = "Bebri ēd zapti" ID = "3" TEXT = "Bebri ēd zapti" Un tā tālāk. Jautājums ir kā nomainīt vārdu "zapti" uz vārdu "egles". Vai to var izdarīt ar MySQL update fišku? Šausmīgi negribas to visu mainīt ar roku, jo tādu ierakstu ir gandrīz 1000. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 11, 2006 Report Share Posted January 11, 2006 (edited) var ;) tik man slinkums rakstiit :) MYSQL f-ja REPLACE() REPLACE('Bebri ēd zapti', 'zapti', 'pankuukas') ;) paareejo domaa patc, slinkums ;) neesmu parbaudijis bet skjiet ka shaadi... P.S. paareejo queriju piedomaa patc.... Edited January 11, 2006 by Grey_Wolf Link to comment Share on other sites More sharing options...
Benvenuto Posted January 11, 2006 Author Report Share Posted January 11, 2006 var ;)tik man slinkums rakstiit :) MYSQL f-ja REPLACE() REPLACE('Bebri ēd zapti', 'zapti', 'pankuukas') ;) paareejo domaa patc, slinkums ;) neesmu parbaudijis bet skjiet ka shaadi... P.S. paareejo queriju piedomaa patc.... Thx. Finaalaa iznaaca shitaa (un nostraadaaja): UPDATE tabula SET lauks = REPLACE(lauks,"zapti","egles"); Link to comment Share on other sites More sharing options...
Recommended Posts