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.
51 pekerja bebas membida secara purata €21 untuk pekerjaan ini
Can you try : select a.first_name, [login to view URL], [login to view URL], [login to view URL], [login to view URL], b.date_of_birth from wp_net_subscribers a inner join wp_net_custom_fields b on [login to view URL] = [login to view URL] and status <> 'unconfirmed'; Relevant Skills a Lagi
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 write complex query for you. Relevant Skills and Experience Have big experience as Senior Database Developer. Make queries of any complexity. Proposed Milestones €14 EUR - query