SQL query

This topic contains 3 replies, has 2 voices, and was last updated by  Stiofan O’Connor 6 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #409826

    anders
    Full Member
    Post count: 121

    Hi,

    I have made a customization where I include a “LEFT OUTER JOIN” clause for listings so that the “linked to business” info can be included here.
    This is working nicely now but I needed to make a small change to one of the plugin files:
    /geodir_location_manager/geodir_location_hooks_actions.php
    The table was not specified for the “post_locations” column in the query which caused “ambiguous” -SQL error. I wanted to ask if the table has not been specified for a purpose or if perhaps this could be updated in an upcoming release?
    Here´s what I did, around line 1640:
    $table_spec = ”;
    if ($p_table != ”) {$table_spec = $p_table . “.”;}
    else if ($table != ”) {$table_spec = $table . “.”;}

    …I then included the $table_spec -variable when constructing the query
    ” AND ” . $table_spec . “post_locations LIKE”

    Thanks!

    #409913

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you explain what you are trying to do maybe i can advise you better?

    Stiofan

    #409957

    anders
    Full Member
    Post count: 121
    This reply has been marked as private.
    #409968

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you have it working the way you want then great! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket