function recipe_get_latest in Recipe 6
Same name and namespace in other branches
- 5 recipe.module \recipe_get_latest()
- 7.2 recipe.module \recipe_get_latest()
- 7 recipe.module \recipe_get_latest()
Get the latest recipes by created date.
Return value
A database query result suitable for use the node_title_list.
1 call to recipe_get_latest()
File
- ./
recipe.module, line 1730 - recipe.module - share recipes
Code
function recipe_get_latest($count = 0) {
$sql = "SELECT n.nid, n.title, n.sticky, n.created FROM {node} n WHERE status = 1 AND type = 'recipe' ORDER BY sticky DESC, created DESC";
return db_query_range(db_rewrite_sql($sql), 0, $count);
}