欢迎各位兄弟 发布技术文章
这里的技术是共享的
select nid from node as n inner join content_field_zong_time as zong_time
on n.nid=zong_time.nid where n.type='gezhongmubiaoautogenerate' and
DATE_FORMAT(zong_time.field_zong_time_value, '%Y-%m-%d') = '2015-01-01'
SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM `node` node LEFT JOIN `field_data_field_user` field_data_field_user ON node.nid = field_data_field_user.entity_id AND (field_data_field_user.entity_type = 'node' AND field_data_field_user.deleted = '0') INNER JOIN `users` users_field_data_field_user ON field_data_field_user.field_user_target_id = users_field_data_field_user.uid INNER JOIN `users` users_node ON node.uid = users_node.uid LEFT JOIN `field_data_field_rc_created_time` field_data_field_rc_created_time ON node.nid = field_data_field_rc_created_time.entity_id AND (field_data_field_rc_created_time.entity_type = 'node' AND field_data_field_rc_created_time.deleted = '0') WHERE (( (node.status = '1') AND (node.type IN ('yunweigongzuorichang')) AND (users_node.uid = '1') AND (DATE_FORMAT(ADDTIME(field_data_field_rc_created_time.field_rc_created_time_value, SEC_TO_TIME(28800)), '%Y-%m-%d') >= '2024-01-01') AND (DATE_FORMAT(ADDTIME(field_data_field_rc_created_time.field_rc_created_time_value, SEC_TO_TIME(28800)), '%Y-%m-%d') <= '2024-12-07') ))) subquery
SELECT users_field_data_field_user.name AS users_field_data_field_user_name, users_field_data_field_user.uid AS users_field_data_field_user_uid, node.created AS node_created, node.nid AS nid, users_node.uid AS users_node_uid, 'user' AS field_data_field_full_name_user_entity_type, 'user' AS field_data_field_ad_department_user_entity_type, 'node' AS field_data_field_wgzsh_richang_node_entity_type FROM `node` node LEFT JOIN `field_data_field_user` field_data_field_user ON node.nid = field_data_field_user.entity_id AND (field_data_field_user.entity_type = 'node' AND field_data_field_user.deleted = '0') INNER JOIN `users` users_field_data_field_user ON field_data_field_user.field_user_target_id = users_field_data_field_user.uid INNER JOIN `users` users_node ON node.uid = users_node.uid LEFT JOIN `field_data_field_rc_created_time` field_data_field_rc_created_time ON node.nid = field_data_field_rc_created_time.entity_id AND (field_data_field_rc_created_time.entity_type = 'node' AND field_data_field_rc_created_time.deleted = '0') WHERE (( (node.status = '1') AND (node.type IN ('yunweigongzuorichang')) AND (users_node.uid = '1') AND (DATE_FORMAT(ADDTIME(field_data_field_rc_created_time.field_rc_created_time_value, SEC_TO_TIME(28800)), '%Y-%m-%d') >= '2024-01-01') AND (DATE_FORMAT(ADDTIME(field_data_field_rc_created_time.field_rc_created_time_value, SEC_TO_TIME(28800)), '%Y-%m-%d') <= '2024-12-07') )) ORDER BY node_created DESC