vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Entering a value in profile field across ALL users? (https://vborg.vbsupport.ru/showthread.php?t=300681)

donkspurs 07-31-2013 06:26 PM

Entering a value in profile field across ALL users?
 
Hello,

I've just recently setup a new user profile field on my forum called 'Points'. This field is not editable by any registered user and isn't required on registration, but has a default value on registration.

The problem is, for all current users there is no data in the field and so it looks like this;

https://vborg.vbsupport.ru/external/2013/07/3.png

It's fine however when data is in the field as shown below;

https://vborg.vbsupport.ru/external/2013/07/4.png

So basically I'm just trying to find a way of entering the value of '0' across ALL registered users so that this field looks fine for everyone on the forum.

Thanks for any help!

mokujin 07-31-2013 06:39 PM

Run this query

UPDATE userfield
SET fieldX = 0

where X is that field number.

donkspurs 07-31-2013 07:31 PM

Thanks for the help mokujin.

Where do I need to run that query? I'm assuming its on the database, so I've tried it within phpMyAdmin but it says I need to 'choose at least one column to display'.

I'm not exactly sure what I need to put in here;

https://vborg.vbsupport.ru/external/2013/07/2.png

mokujin 07-31-2013 07:35 PM

in Phpmyadmin go to the database where your vbulletin is installed, then click to table "userfield"

then run that sql
PHP Code:

UPDATE userfield SET fieldX 

make sure you have entered your table prefix before table userfield if you have one.

donkspurs 08-01-2013 12:19 AM

Thanks a lot mokujin. That's worked brilliantly.

Great help, cheers!

donkspurs 08-03-2013 02:33 PM

Update on this;

I just tried running this sql again and now I get an error message for some reason.

https://vborg.vbsupport.ru/external/2013/08/42.png
https://vborg.vbsupport.ru/external/2013/08/43.png

Why would it work fine before and not now? Nothing has been changed.

Any ideas? Thanks in advance for any help.

--------------- Added [DATE]1375561645[/DATE] at [TIME]1375561645[/TIME] ---------------

Managed to fix it for myself. It was because the fields already had the '0' data in them from the query I ran before. (silly me)

Therefore it needed a WHERE in the sql.

e.g.

UPDATE userfield SET fieldX = '100' WHERE fieldX = '0'

[hope this helps anyone else who's as silly as me]


All times are GMT. The time now is 02:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01018 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete