예제 #1
0
파일: t1.php 프로젝트: ptryfon/loxim-stats
<?php

function hr()
{
    echo "----\n";
}
if (!extension_loaded('lxsbql')) {
    dl('lxsbql.' . PHP_SHLIB_SUFFIX);
}
var_dump(function_exists('lx_query'));
hr();
$c = lx_connect_params("localhost", 2000, "u", "p");
var_dump($c);
var_dump(lx_error_conn());
hr();
var_dump(lx_status());
hr();
hr();
$r = lx_query("begin");
var_dump($r);
hr();
$res = lx_query("(1 as x, 2 as y)");
var_dump($res);
hr();
$r = lx_query("end");
var_dump($r);
hr();
var_dump(lx_fetch($res));
hr();
lx_query("qwe", $c);
var_dump($c);
예제 #2
0
파일: t2.php 프로젝트: ptryfon/loxim-stats
    var_dump($f);
    //if (is_array($f) && is_resource($f[0])) $f = $f[0];
    if (is_resource($f)) {
        //echo "RES! Q: $q //\n";
        var_dump(lx_refid($f));
        var_dump(lx_deref($f));
    }
    lx_dispose($r);
    hr();
}
if (!extension_loaded('lxsbql')) {
    dl('lxsbql.' . PHP_SHLIB_SUFFIX);
}
var_dump(function_exists('lx_query'));
hr();
$c = lx_connect_params("localhost", 2000, "root", "");
var_dump($c);
if (!$c) {
    echo lx_error_conn() . "\n";
    exit;
}
hr();
query("begin");
query("x");
//query("(1 as x, 2 as y).(x, y, y)");
query("92;");
query("pick;");
query("7.4;");
query("1>2;");
query('"napisik";');
query("7 union 6;");