[support] Doubts on VIEWS & DATA module - please help me
nan wich
nan_wich at bellsouth.net
Sat Apr 9 02:42:07 UTC 2011
Assuming that "res_table" is the primary table you created for the view, then
"skilltable" would be a Relationship that you would define in that section of
the view.
All the fields in the WHERE clause are "filters," which you would "expose" to
the user.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________
From: Austin Einter <austin.einter at gmail.com>
To: support at drupal.org; development at drupal.org
Sent: Fri, April 8, 2011 10:27:32 PM
Subject: [support] Doubts on VIEWS & DATA module - please help me
Hi All
I have around 5 different tables containing employee records (Name, skill set ,
current company, years of experience etc).
I am trying to show the employee records for different kind of search.
One seacrh may be, show all the employees having knowledge on PHP and must have
5+ years of experience.
I know, I need to a database query and show it in a view (either a page or block
display).
I know how to collect the records. The query will be something like this.
SELECT res_table.name, res_table.yrsexp, res_table.emailid
FROM res_table
WHERE (res_table.yrsexp >= 5 AND skilltable.userid = $user->userid AND
skilltable.skill = 'PHP')
Or even in some cases I need to go for JOIN.
Somebody suggested to use Data module for it. I gave a try, I am just seeing
tables (in view creation), not sure how do I impose the custom SQL query.
Is it really possible to impose above kind of sql query using Data module???
Or is it the best way to go for custom module and implement _alter_view or
_pre_exute_view hooks.
Regards
Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110408/ba864022/attachment-0001.html
More information about the support
mailing list