Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 14 Years, 3 Months, 3 Weeks ago SQL Query Needed
#1
Solved: 14 Years, 3 Months, 3 Weeks ago
I want to run a query to set every user to a specific option of a custom field.

Ive added a "What mybb version are you using" custom field.

Options:
N/A
1.4
1.5
1.6
et......

I want to set every user to N/A if they hav'nt selected an option, any ideas?
#2
Solved: 14 Years, 3 Months, 3 Weeks ago
Replace 3 with the id of your field :p

Update mybb_userfields SET fid3='N/A' WHERE fid3='';
Thanks, Polarbear541
#3
Solved: 14 Years, 3 Months, 3 Weeks ago
Hmmm , it didnt effect any rows "Affected rows: 0 (Query took 0.0004 sec)"
#4
Solved: 14 Years, 3 Months, 3 Weeks ago
Worked for me are you sure the existing ones are empty?
Thanks, Polarbear541
#5
Solved: 14 Years, 3 Months, 3 Weeks ago
Yea there empty, heres a link to a random user : http://www.mybbextras.com/member.php?act...ile&uid=45

You'll see that the "Select your mybb version" field is empty
#6
Solved: 14 Years, 3 Months, 3 Weeks ago
Any ideas why this query is not working ?

So annoying , works for fid3 but not for fid4
#7
Solved: 14 Years, 3 Months, 3 Weeks ago
Can you print screen the mybb_userfields table so we can see what data is already there, please blur out any sensitive data.
#8
Solved: 14 Years, 3 Months, 3 Weeks ago
Ok ive noticed something , it say NULL beside ID4


Yea that was the problem , got it now , thanks tim Big Grin


Attached Files Thumbnail(s)
   


Forum Jump:


Users browsing this thread: 1 Guest(s)