Well I have a business listings with circa 100 business's listed with a 505 area code. THe men in charge at state level thought it would be a great idea to change to 575 area code. I dont want to have to go on, select busines, edit business, save businesss over and over and over. Is there a script or sommet I can run on the database to change all 505 to 575 ?
Change area codes
Collapse
X
-
just use phpmyadmin and use sql.
first do a select * from your_table where area_code = 505 (you may not have the area code stored in a seperate field so will have to use 'substring', 'like' or 'left' to extract the area code bit)
check that you get all the results back you want and no others (esp important if your area code isn't a seperate field)
then run the sql:
update your_table set area_code = 575 where area_code = 505 (or whatever 'where' clause you used above)
Hope this helpsDavid Allen - www.serina.co.uk
-
thank it helps!
I used it in similar way.
I store npa nxx lookup tool and had same problem.
I solved it like this:
UPDATE `NPA` SET `npa` = '505' WHERE `npa` = '704';
So i`ve update all my nanp database with single query, and all npa and nxx are fine now.
Maybe it could be useful for somebody, I`m a new in MySQL and it helps.
Comment
Comment