IT. Expert System.

PHP

Returns the forward matching keys


TokyoTyrant::fwmKeys

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::fwmKeysReturns the forward matching keys

Description

public array TokyoTyrant::fwmKeys ( string $prefix , int $max_recs )

Returns the forward matching keys from the database

Parameters

prefix

Prefix of the keys

max_recs

Maximum records to return

Return Values

Returns an array of matching keys. The values are not returned

Examples

Example #1 TokyoTyrant::fwmKeys() example

<?php

$tt 
= new TokyoTyrant("localhost");

/* Create 20 macthing keys */
for ($i 0$i 20$i++) {
    
$tt->put("key_" $i"value_" $i);
}

/* Create 20 non-macthing keys */
for ($i 0$i 20$i++) {
    
$tt->put("something_" $i"data_" $i);
}

/* Get five matching keys */
var_dump($tt->fwmKeys("key_"5));
?>

The above example will output something similar to:

 array(5) { [0]=> string(5) "key_5" [1]=> string(6) "key_14" [2]=> string(5) "key_6" [3]=> string(6) "key_15" [4]=> string(5) "key_7" } 



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 77 / 158680536. Delta: 0.05230 с