Can anyone help me converting this query using db_query to db_select or EntityFieldQuery? I already tried a lot of things but always getting error. I am new with Drupal, my query works well but I think it's better converting this to db_select or EntityFieldQuery, what you think?
UPDATE
My query:
function get_recent_videos($uid) {
$query = db_query('SELECT * FROM {node} n, {field_data_field_video} v
WHERE n.uid = :uid
AND n.nid = v.entity_id
AND v.field_video_value IS NOT NULL
ORDER BY created DESC
LIMIT 0, 4', array(':uid' => $uid));
$result = $query->fetchAll();
return $result;
}
How can I use a placeholder in the limit? I tried the same approach that I have used in :uid but didn't work.
Thanks a lot.