【问题标题】:Querying Users based on role and billing address drupal根据角色和账单地址查询用户 drupal
【发布时间】:2014-09-30 21:12:03
【问题描述】:

我正在尝试编写一个查询,根据用户的角色和帐单地址显示用户列表。

我正在返回结果,但某些数据有误。例如,我知道一些用户在英国返回,但显示的是美国地址。

我的查询是

`SELECT u.uid, u.name, mail,  commerce_customer_address_country, commerce_customer_address_postal_code, fdcca.entity_id FROM users u  
INNER JOIN users_roles ur ON ur.uid = u.uid
INNER JOIN user_address ua ON ua.uid = u.uid
INNER JOIN field_data_commerce_customer_address fdcca ON ua.address_id = fdcca.entity_id   
WHERE ur.rid = 11 AND commerce_customer_address_country != 'GB' 
LIMIT 50`

我认为我的连接有误,但我有点迷茫,如果有任何提示,我将不胜感激。

【问题讨论】:

    标签: sql drupal drupal-7 drupal-commerce


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2021-02-01
    • 2014-09-22
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 2017-10-06
    相关资源
    最近更新 更多