Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MySql
 Phone Number Change
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 17 November 2007 :  18:13:04  Show Profile
Hi,

I need to change the following fields within the FORUM_MEMBERS table.

- M_SMS
- M_PHONE

At present all numbers begin with '0' I need to change this to '+44' to make them all international, they are all uk numbers luckily.

So basically 08701355431 need to become +448701355431

Can someone please show me the dbs code I would need to run to update the table.

Phil

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 18 November 2007 :  07:27:26  Show Profile
Also if it helps

M_SMS is nvar, 20
M_PHONE is char, 50

Should they be the same type after all they contain the same data.

If so what files need updating so the profiles files will update in future.

Phil
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 20 November 2007 :  15:05:21  Show Profile  Send pdrg a Yahoo! Message
dammit, I was spelling this out for you in T-SQL, sorry my PL/SQL (?) is lousy

What you do need though is an UPDATE statement similar to...

UPDATE FORUM_MEMBERS
SET M_SMS = "+44" & right(M_SMS, 10),
M_PHONE = "+44" & right(M_PHONE, 10)
;

Now in all seriousness, test the backside off this before doing it - in fact make a copy of the table or add a couple of fields called INTL_M_SMS and INTL_M_PHONE or something, and tweak the code to

UPDATE FORUM_MEMBERS
SET INTL_M_SMS = "+44" & right(M_SMS, 10),
INTL_M_PHONE = "+44" & right(M_PHONE, 10)
;

first. Oh, and I've no idea what the MySQL string handling is like, so it's probably not 'right' and '&', so look these up!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07