title: Select data from table using REDISQL in Redis
body: <p>I have install <strong>Redis</strong> in <code>Ubuntu 16.04.6</code> successfully.</p>
  
  <p>Here is the demo code for set and get value in <strong>redis</strong>.</p>
  
  <pre><code>&lt;?php 
      //Connecting to Redis server on localhost 
      $redis = new Redis(); 
      $redis-&gt;connect('127.0.0.1', 6379); 
     //set the data in redis string 
     $redis-&gt;set("tutorial-name", "Redis tutorial"); 
    // Get the stored data and print it 
    echo "Stored string in redis:: " .$redis-&gt;get("tutorial-name");
  ?&gt;
  </code></pre>
  
  <p>And I have got correct output as below.</p>
  
  <pre><code># php redis.php 
  Stored string in redis:: Redis tutorial
  </code></pre>
  
  <p>Now I want to store some value in redis with SQL so I configure <strong>Redis</strong> with <strong>RedisSQL</strong> and it configures correctly and working fine with a command line.</p>
  
  <p>I have create one DB and insert one record for testing.</p>
  
  <p>Here is the output of the SQL select query in <strong>Redis</strong>.</p>
  
  <pre><code># redis-cli -p 6379
  127.0.0.1:6379&gt;  REDISQL.EXEC DB "SELECT * FROM foo;"
  1) 1) (integer) 3
  2) "bar"
  </code></pre>
  
  <p>Now I want to try to get the same query result in PHP script so I search for this and find like using rawcommand to get command output in redis so I tried using the same command as below.</p>
  
  <pre><code>&lt;?php 
      //Connecting to Redis server on localhost 
      $redis = new Redis(); 
      $redis-&gt;connect('127.0.0.1', 6379); 
      $result = $redis-&gt;rawCommand('REDISQL.EXEC', 'foo', 'SELECT * FROM foo;');
      echo "Foo table Data:";
      print_r($result);
  ?&gt;
  </code></pre>
  
  <p>But get <code>$result</code> value blank.</p>
  
  <pre><code># php redis.php 
    Foo table Data:
  #
  </code></pre>
  
  <p>So can anyone guide me to get the correct result for SQL query, with rawCommand or any other command?</p>
  
  <p>Thanks in advance.</p>