filter pods by current logged user
-
Hi,
i’m trying to filter pods by the current logged user but it’s returning an error, could you help me?
this is the code:
global $user_ID;
get_currentuserinfo();$anuncios = new POD(‘anuncios’);
$anuncios->findRecords(‘name ASC’,-1, ‘author.ID = “‘.$user_ID.'”‘);I don’t really know what tag i need to use (author, author.ID… noone worked)
This is the error i get:
Database Error; SQL: SELECT DISTINCT
t.* FROMwp_postsAStWHERE ( (author.ID= “12” ) AND (t.post_type= “anuncios” ) ) ORDER BYt.post_titleASC,t.menu_order,t.post_title,t.post_date; Response: Unknown column ‘author.ID’ in ‘where clause’Thank you very much!
The topic ‘filter pods by current logged user’ is closed to new replies.