Make Connections

Network, Get Answers, Find Members in Your Area, and More!

Forums » Advice, Smarts and Warnings

How to apply Select Query in Drupal 7

    • 3 posts
    July 21, 2013 7:48 PM EDT

    <?php

             $result=db_select('node','n')

             ->fields('n')

             ->condition('nid', $node->nid, '=')

             ->condition('status', 0, '>')

             ->execute()

             ->fetchAssoc();

    ?>