We are displaying data from a mySQL 5.1 database on our website. In the past we used an SQL query to gather the following fields from a table:
where the "status" field of the user was confirmed.
In the past this was easy because all the users were stored in one table (wp_net_user), and 1 subscriber's data was stored in one line (first_name, state, city...) so it was easy to print out in a horizontal order with a MySQL query.
I don't know why but this was changed by the management and users and their fields are now stored in 2 different tables: wp_net_subscribers (first name, last name, status) and wp_net_custom_fields (city, state, profession, date_of_birth).
So we need an SQL query which shows these in a horizontal line:
from table "wp_net_subscribers":
- "first_name" field,
- "status" field
from table "wp_net_custom_fields" corresponding to the id of the subscriber:
- "city" field,
- "state" field,
- "profession" field,
- "date_of_birth" field
where the status is "subscribed" or "unsubscribed". So both statuses should be displayed. Or you can exclude "unconfirmed" status.
53 pekerja bebas membida secara purata €21 untuk pekerjaan ini
Will create single query using both the tables and show in a row. Relevant Skills and Experience I have 15+ years of experience. Proposed Milestones €34 EUR - Project milestone Send me both tables structure.
Can you try : select a.first_name, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], b.date_of_birth from wp_net_subscribers a inner join wp_net_custom_fields b on [url removed, login to view] = [url removed, login to view] and status <> 'unconfirmed'; Relevant Skills a Lagi