Esempio n. 1
0
    exit(-1);
}
$item = $result->root;
while ($item) {
    echo "value: {$item->value}\n";
    $item = $item->next;
}
for ($i = 0; $i < 10; $i++) {
    $val = sprintf("a%d", $i);
    $ret = $m->sortlist_insert("dkey", $val, strlen($val), "1:1:1");
    if ($ret != MEMLINK_OK) {
        echo "sortlist insert error! {$ret}\n";
        exit(-1);
    }
}
$ret = $m->sortlist_range("dkey", MEMLINK_VALUE_VISIBLE, "a2", 2, "a9", 2, "");
if ($ret == NULL) {
    echo "sortlist range error: {$ret}\n";
    exit(-1);
}
echo "sortlist:\n";
$item = $ret->root;
while ($item) {
    echo "value: {$item->value}\n";
    $item = $item->next;
}
$rcinfo = $m->read_conn_info();
if ($rcinfo == NULL) {
    echo "read_conn_info error: {$ret}\n";
    exit(-1);
}