phpredispredistile38

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


Solution

  • 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.