View Full Version : SQL Query for Profile Field
smooth-c
04-17-2011, 11:48 AM
Okay. I have a profile field to allow members to chose what header they use on my forum. The option is titled 'Show legacy header' - The default option is No. I've recently changed my branding so I want to force the original header to everyone, even those that have changed their header to the legacy header by chosing 'Yes'
What SQL query could I use to change this for everyone? To change their option set to 'No' ?
Thank you!
Greg
YankForum
04-17-2011, 12:09 PM
u cant get a aclear answer because nobody knows table's name and attribute but it should be similar to ;
update table xxxx set xxxx = 'No' ; // it does it for all and u may lose all ur saved data
smooth-c
04-17-2011, 12:30 PM
I'm not really sure how I could be more clear. The profile field I wish to change is numbered 21. I'm sure I've seen it somewhere before? I wasn't aware there'd be a table that'd need changing.
Thanks though.
YankForum
04-17-2011, 03:50 PM
update table xxxx set xxxx = 'No' ;
replace first xxxx with table's name and 2nd xxxx with fields title , More Info (http://dev.mysql.com/doc/refman/5.0/en/update.html)
smooth-c
04-17-2011, 03:51 PM
How do I find out which table to change? Thank you!
Lynne
04-17-2011, 04:01 PM
Table should be userfield. If you have a prefix, then it would be prefixuserfield.
So, something like
UPDATE userfield SET field21 = 'No';
As always, test this on your test site first and do a backup of your database before running ANY query.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.