SQL Output for debugging

Discussion in 'Customization & add-ons' started by dazzafact, May 30, 2015.

  1. dazzafact

    dazzafact New Member

    Joined:
    May 19, 2015
    Messages:
    14
    Hello,
    iam trying to start with my custom PHP-Script in Amember.

    PHP:
    $location Am_Di::getInstance()->db->select("SELECT * FROM _requests WHERE lon ='?' AND lat ='?' LIMIT 1"'33.4550','12.4550');
    For that simple SQL statment iam getting an empty output array. This can not be, because this Solution is working
    PHP:
    $location Am_Di::getInstance()->db->select("SELECT * FROM _requests WHERE lon ='33.4550' AND lat ='12.4550' LIMIT 1");
    Is there a Debug Mode to output the generated Statement?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Syntax is incorrect.
    Use this instead:
    PHP:
    $location Am_Di::getInstance()->db->select("SELECT * FROM _requests WHERE lon =? AND lat =? LIMIT 1"'33.4550','12.4550');
  3. dazzafact

    dazzafact New Member

    Joined:
    May 19, 2015
    Messages:
    14
    Not working. this was of course my first try.
    Thats why i need a SQL output of the rendered SQL - Debug

Share This Page