Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

SQL Query Help Please

SQL Query Help Please

SQL Query Help Please

Hi guys, I am very new to SQL and could really need some help with an SQL Query please...

I need an SQL Query that will copy the column data of 'user_login' found in table 'wp_users' and replace the column of 'value' that is found in table 'wp_bp_xprofile_data' BUT only if the column of 'field_id' found in ' 'wp_bp_xprofile_data' = '1'

I hope that makes sense?

Any help greatly appreciated

Thanks in advance

RE: SQL Query Help Please

Hi there, thanks for your reply.  I'm sorry, I'm new to this and don't understand what you mean by 'relationship'

If it helps, I can tell you that I have one database, with 97 tables, two of which are:


wp_xprofile_data looks like this:

id | field_id | user_id | value
1 | 1 | 1 | john smith
2 | 2 | 1 | john@smith.com
3 | 3 | 1 | 123456
4 | 1 | 2 | joe bloggs
5 | 2 | 2 | joe@bloggs.com
6 | 3 | 2 | 987564

Does this help at all?


RE: SQL Query Help Please


The column names of the table 'wp_users' looks like this:

ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name, spam, deleted

Does that help?


RE: SQL Query Help Please


Thank you so much!

That worked.  You have just saved me hours of time, thank you!


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close