<div>Hi All</div>
<div>I have around 5 different tables containing employee records (Name, skill set , current company, years of experience etc).</div>
<div>I am trying to show the employee records for different kind of search. </div>
<div> </div>
<div>One seacrh may be, show all the employees having knowledge on PHP and must have 5+ years of experience.</div>
<div>I know, I need to a database query and show it in a view (either a page or block display).</div>
<div> </div>
<div>I know how to collect the records. The query will be something like this.</div>
<div> </div>
<div>SELECT <a href="http://res_table.name">res_table.name</a>, res_table.yrsexp, res_table.emailid<br> FROM res_table<br> WHERE (res_table.yrsexp >= 5 AND skilltable.userid = $user->userid AND skilltable.skill = 'PHP') <br>
</div>
<div>Or even in some cases I need to go for JOIN.</div>
<div> </div>
<div>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.</div>
<div>Is it really possible to impose above kind of sql query using Data module???</div>
<div> </div>
<div>Or is it the best way to go for custom module and implement _alter_view or _pre_exute_view hooks.</div>
<div> </div>
<div>Regards</div>
<div>Austin</div>
<div> </div>
<div> </div>
<div> </div>