Created
September 21, 2016 08:46
-
-
Save ItamarGronich/9901f576a2700667141138b0756ea77c to your computer and use it in GitHub Desktop.
db_query in drupal 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Same example in Drupal 6 | |
$uid = 1; | |
$result = db_query("SELECT n.nid, n.title, n.created | |
FROM {node} n WHERE n.uid = %d", $uid); | |
while ($record = db_fetch_object($result)) { | |
// Perform operations on $record->title, etc. here. | |
} | |
// NOTE: db_fetch_object and db_fetch_array have been removed from D7! | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment