Judge Jules
Judge Jules

Reputation: 192

How to execute plain Redis queries in PHP using predis

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

Upvotes: 1

Views: 971

Answers (1)

tidwall
tidwall

Reputation: 6949

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.

Upvotes: 2

Related Questions