Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7808579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:10:35+00:00 2026-06-02T03:10:35+00:00

I have the need to move members from ExpressionEngine to WordPress. So far, I’ve

  • 0

I have the need to move members from ExpressionEngine to WordPress. So far, I’ve been helped on Stackoverflow with the following query which works great and produces 696 results (the correct number of members). However I need to also export some columns from another table, and when I add them to the query, I get 484416 results (696 x 696).

Here is the original query which returns 696 results:

SELECT username AS user_login, 
username AS user_nicename, 
email AS user_email, 
url AS user_url, 
screen_name AS display_name, 
FROM_UNIXTIME(join_date) AS user_registered
FROM exp_members

Here is what I would like to do, which I tried to do with Navicat‘s Query builder. Grab the column called m_field_id_1 from the exp_member_data table and return it as user_location. This query produces 484416 results.

SELECT exp_members.username AS user_login, 
exp_members.username AS user_nicename, 
exp_members.email AS user_email, 
exp_members.url AS user_url, 
exp_members.screen_name AS display_name, 
FROM_UNIXTIME(join_date) AS user_registered, 
exp_member_data.m_field_id_1 AS user_location // here is the m_field_id_1
FROM exp_members, exp_member_data

How do I properly combine these 2 tables so there’s still only 696 returned results but with the additional column? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:10:36+00:00Added an answer on June 2, 2026 at 3:10 am

    You need a JOIN condition between the tables, or you get a cartesian product of the two (all rows of table1 multiplied by all rows of table2, or 696^2 in this case).

    SELECT
      exp_members.username AS user_login, 
      exp_members.username AS user_nicename, 
      exp_members.email AS user_email, 
      exp_members.url AS user_url, 
      exp_members.screen_name AS display_name, 
      FROM_UNIXTIME(join_date) AS user_registered, 
      exp_member_data.m_field_id_1 AS user_location
    FROM
      exp_members
      JOIN exp_member_data 
        /* ON clause specifies the relation between the two tables */
        ON exp_members.username = exp_member_data.username
    

    The above assumes there’s a column in exp_member_data called username which maps to exp_member.username. If instead there is an id column between them, use it instead as in:

      JOIN exp_member_data ON exp_members.member_id = exp_member_data.member_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have need to return multiple results from a subquery and have been unable
I have a Hashmap which has X number of elements I need to move
I have a task where I need to move a bunch of files from
I have a need to move an item in an IEnumerable<> up, that is
I need to move backwards through an array, so I have code like this:
I have groups of people. I need to move groups with at least one
On a page I have, I need to move TinyMCE editors in the DOM
I have need to select a number of 'master' rows from a table, also
I need to move or copy a simple text file from one web site
I have created a custom class for my dates and need move dates forward

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.