You are here

function example_db_result in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_db_result()

File

coder_upgrade/tests/old/samples/example.module, line 546

Code

function example_db_result() {
  $val = db_result(db_query('SELECT nid FROM {node}'));
  $val = db_result(db_query('
      SELECT nid FROM {node}
      LIMIT 1
    '));
  $val = db_result(db_query('SELECT title FROM {node} WHERE nid = %d ', $nid));
  $val = db_result(db_query('
      SELECT title FROM {node}
      WHERE nid = %d
    ', $nid));
  $query = db_query('SELECT * FROM {node}');
  $val = db_result($query);
}