add custom submit to system setting form drupal 7

The default submit handler of $form_id . '_submit' only fires if no other submit handlers have been set. Because system_settings_form() sets a submit handler, the default handler doesn't fire, so you have to specify it if you want to use it. You can do so like this: /** * A custom form. */ function custom_form()... Continue Reading →


Correct way for a db_query for nodes between two timestamps

In Drupal, I have a very simple db_query. I want to look for any node created between two timestamps. This query works fine in MySQL shell SELECT nid as id,created as start,title FROM node WHERE created BETWEEN '1403564400' AND '1403650800'; This works fine in Drupal $data = db_query("SELECT nid as id,created as start,title FROM node")->fetchAll();... Continue Reading →

Up ↑