Skip to content

Commit 41bcf35

Browse files
Fix typo and align table columns
1 parent f7edee5 commit 41bcf35

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

README.markdown

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,15 +3126,15 @@ _**Description**_: Return members of a set with geospacial information that are
31263126
##### *Options Array*
31273127
The georadius command can be called with various options that control how Redis returns results. The following table describes the options phpredis supports. All options are case insensitive.
31283128

3129-
Key | Value | Description
3130-
--- | --- | ---- |
3131-
COUNT | `integer $count` | Limit how many results are returned
3132-
| WITHCOORD | Return longitude and latitude of matching members
3133-
| WITHDIST | Return the distance from the center
3134-
| WITHHASH | Return the raw geohash-encoded score
3135-
| ASC | Sort results in ascending order
3136-
| DESC | Sort results in descending order
3137-
3129+
| Key | Value | Description
3130+
| :--- | :--- | :---- |
3131+
| COUNT | integer > 0 | Limit how many results are returned
3132+
| | WITHCOORD | Return longitude and latitude of matching members
3133+
| | WITHDIST | Return the distance from the center
3134+
| | WITHHASH | Return the raw geohash-encoded score
3135+
| | ASC | Sort results in ascending order
3136+
| | DESC | Sort results in descending order
3137+
31383138
*Note*: It doesn't make sense to pass both `ASC` and `DESC` options but if both are passed the last one passed will win!
31393139
*Note*: PhpRedis does not currently support the `STORE` or `STOREDIST` options but will be added to future versions.
31403140

@@ -3217,10 +3217,10 @@ array(1) {
32173217

32183218
##### *Prototype*
32193219
~~~
3220-
$redis->geoRadiusByMember($key, $member, $radius, $units [, array $options]);
3220+
$redis->geoRadiusByMember($key, $member, $radius, $units [, Array $options]);
32213221
~~~
32223222

3223-
_**Description**_: This method is identical to `geoRadius` except that instead of passing a longitude and latitude as the "source" you pass an existing member in the geospacial set.
3223+
_**Description**_: This method is identical to [geoRadius](#georadius) except that instead of passing a longitude and latitude as the "source" you pass an existing member in the geospacial set.
32243224

32253225
##### *Options Array*
32263226
See [geoRadius](#georadius) command for options array.
@@ -3232,19 +3232,28 @@ See [geoRadius](#georadius) command for options array.
32323232
~~~
32333233
$redis->geoAdd("hawaii", -157.858, 21.306, "Honolulu", -156.331, 20.798, "Maui");
32343234
3235-
echo "Within 300,000 miles of Honolulu:\n";
3235+
echo "Within 300 miles of Honolulu:\n";
32363236
var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi'));
3237+
3238+
echo "\nFirst match within 300 miles of Honolulu:\n";
3239+
var_dump($redis->geoRadiusByMember("hawaii", "Honolulu", 300, 'mi', Array('count' => 1)));
32373240
~~~
32383241

32393242
##### *Output*
32403243
~~~
3241-
Within 300,000 meters of Honolulu:
3244+
Within 300 miles of Honolulu:
32423245
array(2) {
32433246
[0]=>
32443247
string(8) "Honolulu"
32453248
[1]=>
32463249
string(4) "Maui"
32473250
}
3251+
3252+
First match within 300 miles of Honolulu:
3253+
array(1) {
3254+
[0]=>
3255+
string(8) "Honolulu"
3256+
}
32483257
~~~
32493258

32503259

0 commit comments

Comments
 (0)