The module development and code questions forum is intended to aid those who are developing modules or writing code for Drupal.
Please note that this forum is also not intended for "Is there a module that does..." or "I need help with module x..." questions. It's also not a place to ask developers to write your code for you. Please respect this.
Please do not post general discussions intended to target module developers. If the question you have isn't specifically related to writing a drupal module, please post it in a more appropriate forum.
If you you have drupal installed already and are seeking a module that does a specific task, have a question about a specific module and what it does or if it will fit your use case, please place your questions in the Post installation forum.
If you have a problem or question about a specific module, you should create an issue in the module's issue queue (after checking for an existing issue first).
If you don't have drupal installed yet, please place your questions in the Before you start forum.
My simple issueTracker custom module should be able to capture the node id, or at least the referring url so we know what page the user was on. Turning on the dev module I can see that the vid property would do nicely to capture as a hidden value. Reading on the docs I see how I can set the global to $user which I can capture the uid from that object. In my searches, I don't see an equivalent to capture this object.
Hey all, not a very active member of this community, but have been developing in Drupal for several years. I'm currently working on a portfolio site for my work. I originally created a field type that handled images, adding title, description, and anchor point data as well as the ability to responsively load images. That field was then added to a Project content type. Originally, the template for the Project content type would programmatically figure out where to place images alongside text content.
I need a way to find out number of records which are repeated after grouping two columns [Also, these two columns are coming from two different tables]. I can execute it using db_query but not sure what I am missing when using db_select.
Query executed in db_query:
SELECT count(*) as count,n.`nid`,u.`name` FROM `node_view_count` n LEFT JOIN `users` u ON n.`uid` = u.`uid` WHERE n.`uid` <> 0 GROUP BY n.`nid`,u.`name`;
Above query is returning me number of repeated records as well who have uid and nid same.