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 8612737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:42:06+00:00 2026-06-12T04:42:06+00:00

I read some suggestions but couldn’t figure out how to make the query that

  • 0

I read some suggestions but couldn’t figure out how to make the query that is generated and shown by views – valid in MySQL. There are some variables closed in {} and also I think there are some tables in the query which don’t exist in the DB. I’m trying to extract a quite complicated query here it is.

SELECT field_data_field_punch_status.field_punch_status_value AS field_data_field_punch_status_field_punch_status_value, users.name AS users_name, users.uid AS uid_1, field_data_field_punch_start.field_punch_start_value AS field_data_field_punch_start_field_punch_start_value, field_data_field_team.field_team_tid AS field_data_field_team_field_team_tid, users.access AS users_access, MIN(users.uid) AS uid, 'user' AS field_data_field_punch_status_user_entity_type, 'user' AS field_data_field_punch_start_user_entity_type, MIN(node_users.nid) AS node_users_nid, 'node' AS field_data_field_punch_end_node_entity_type, MAX(node_users__field_data_field_punch_end.field_punch_end_value) AS node_users__field_data_field_punch_end_field_punch_end_value, 'user' AS field_data_field_team_user_entity_type
FROM 
{users} users
LEFT JOIN {field_data_field_team} field_data_field_team ON users.uid = field_data_field_team.entity_id AND (field_data_field_team.entity_type = 'user' AND field_data_field_team.deleted = '0')
INNER JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_team ON field_data_field_team.field_team_tid = taxonomy_term_data_field_data_field_team.tid
LEFT JOIN {node} node_users ON users.uid = node_users.uid
INNER JOIN {users_roles} users_roles ON users.uid = users_roles.uid
LEFT JOIN {field_data_field_punch_status} field_data_field_punch_status ON users.uid = field_data_field_punch_status.entity_id AND (field_data_field_punch_status.entity_type = 'user' AND field_data_field_punch_status.deleted = '0')
LEFT JOIN {field_data_field_punch_start} field_data_field_punch_start ON users.uid = field_data_field_punch_start.entity_id AND (field_data_field_punch_start.entity_type = 'user' AND field_data_field_punch_start.deleted = '0')
LEFT JOIN {field_data_field_punch_end} node_users__field_data_field_punch_end ON node_users.nid = node_users__field_data_field_punch_end.entity_id AND (node_users__field_data_field_punch_end.entity_type = 'node' AND node_users__field_data_field_punch_end.deleted = '0')
WHERE (( (field_data_field_team.field_team_tid IN('0', '10', '11', '22', '12', '2', '21', '3', '13', '4', '14', '5', '15', '6', '16', '7', '17', '18', '20', '19') ) AND (users_roles.rid IN  ('4', '5')) ))
GROUP BY field_data_field_punch_status_field_punch_status_value, users_name, uid_1, field_data_field_punch_start_field_punch_start_value, field_data_field_team_field_team_tid, users_access
ORDER BY field_data_field_punch_start_field_punch_start_value DESC, users_access DESC
  • 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-12T04:42:07+00:00Added an answer on June 12, 2026 at 4:42 am

    What you see between curly brackets (e.g. {field_data_field_team}) is the name of a database table. They are shown between curly brackets because the code that execute SQL queries replaces what there is between curly brackets with the prefix set for the database tables.

    Suppose that your Drupal installation uses drupal7_ as prefix; the name of the table referred as {field_data_field_team} is drupal7_field_data_field_team.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read some microsoft articles.They explained that WCF uses DataContractSerializer for serialization.But the articles
I read some XSLT examples and found that code: <xsl:apply-template select=@*|node()/> What does that
I read some articles about Comet tech. All of them mentioned that the long-life
I read some of the discussion in this question and thought to myself that
I read some tutorials concerning Makefiles but for me it is still unclear for
Okay, thus may seen kind of odd, but I wanted to get some suggestions
I am trying to use regex to parse out some lines from text read
I've read several SO about related code snippets and suggestions for this, but I
I read some topics here, but I haven't found the solution of my problem.
I read some tutorial in Google App Engine, in those tutorial there is same

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.