Announcement

Collapse
No announcement yet.

Query database from external script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query database from external script

    I am using the api like this:

    Code:
        define('VB_ENTRY', 1);
        
        require_once('./includes/api/interfaceabstract.php');
        require_once('./includes/vb5/template/options.php');
        require_once('./includes/vb5/cookie.php');
        require_once('./includes/api/interface/collapsed.php');
        require_once('./includes/api/interface/noncollapsed.php');
        require_once('./includes/vb5/config.php');
        
        $config = vB5_Config::instance();
        $config->loadConfigFile('config.php');
        $api = Api_InterfaceAbstract::instance();
        $loginInfo = $api->callApi('user', 'login', array('myname', 'mypw'));
    In the example code i check for the correct login.

    But how can i query the database and use custom sql statements?

    Also is there any overview of available commands i can use for callApi?

    Thanks.



    EDIT:

    Figured it out by using $db->query_read.

    This can be seen as solved .
    Last edited by chris76423; Sat 12 Sep '15, 4:45am.

Related Topics

Collapse

Working...
X