We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39569
    • 9 Posts
    Modx revo 2.2
    I'm trying to make a snippet to get the value "vote_total" from the database "modx_star_rating":

    $ docId = $ modx-> resource-> get ('id');
    $ result = $ modx-> db-> select ("vote_total, $ modx-> db-> getFullTableName ('modx_star_rating'), star_id = docId");
    $ vote = $ modx-> getValue ($ result);
    echo $ vote;

    Either get a syntax error on the symbol "="

    or

    Call to a member function select () on a non-object
    How to make a request $ modx-> db-> select ()?
    What may be my problem?