How to execute plain Redis queries in PHP using predis

654 Views Asked by At

How can I send a raw command to Redis using the PHP predis package

$client->executeRaw('INTERSECTS vehicle LIMIT 1000 GET geofence geofence_id');

is it something applicable

1

There are 1 best solutions below

2
On BEST ANSWER

You'll need to make your command an array.

$client->executeRaw(['INTERSECTS', 'vehicle', 'LIMIT', '1000', 'GET', 'geofence', 'geofence_id']);

See https://github.com/predis/predis#adding-new-commands for more information.