I want to make a simple list (in table form) of the users, that have some customized fields in the profile (using bio) in Drupal 5.
There's a field Date (datestamp), and when I create the view selecting all the users with my date field > 2006 (or wathever) it shows nothing, but ONLY with the TABLE VIEW mode, if I select "Full Nodes" o "Teaser List" it works fine. So it seems to be a Views issue, not a bio, or Date, issue.
I have extracted the Query that drupal is sending to MYSQL (with the SQL Log option in my.ini) and is this:
SELECT node.nid, usernode_users.name AS usernode_users_name,
usernode_users.uid AS usernode_users_uid,
bio_node_data_field_fecha_incial.field_fecha_incial_value AS bio_node_data_field_fecha_incial_field_fecha_incial_value,
bio.nid AS bio_nid
FROM node node
LEFT JOIN content_type_bio node_data_field_fecha_incial ON node.vid = node_data_field_fecha_incial.vid
INNER JOIN usernode usernode ON node.nid = usernode.nid
LEFT JOIN users usernode_users ON usernode.uid = usernode_users.uid
LEFT JOIN node bio ON node.uid = bio.uid AND bio.type = 'bio'
LEFT JOIN content_type_bio bio_node_data_field_fecha_incial ON bio.vid = bio_node_data_field_fecha_incial.vid
WHERE (FROM_UNIXTIME(node_data_field_fecha_incial.field_fecha_incial_value) >= '2006-12-21 00:00:00')
The problem seems to be in the last line, because if i change it for that one, it works fine:
WHERE (FROM_UNIXTIME(bio_node_data_field_fecha_incial.field_fecha_incial_value) >= '2006-12-21 00:00:00')
I don' understand pretty much how views queries are constructed but there are two "alias" for the same table name, but it only works if I select the second one...
LEFT JOIN content_type_bio node_data_field_fecha_incial
LEFT JOIN content_type_bio bio_node_data_field_fecha_incial
Any help please?
Comments
Comment #1
esmerel commentedgiven the age of this issue, I'm going to presume it's either figured out or no longer relevant.