• Resolved dituyi

    (@dituyi)


    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.* FROM wp_posts AS t WHERE ( ( author.ID = “12” ) AND ( t.post_type = “anuncios” ) ) ORDER BY t.post_title ASC, t.menu_order, t.post_title, t.post_date; Response: Unknown column ‘author.ID’ in ‘where clause’

    Thank you very much!

    http://wordpress.org/extend/plugins/pods/

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘filter pods by current logged user’ is closed to new replies.