I'm using the following library: predis php library. Here's the direct github predis github code
In my code, I'm doing the following:
$st=mysqli_query($dbh,"select somethoing from something");
while($row=mysqli_fetch_assoc($st)){
$redis->hmset("us-states-data-hash",$row);
}
Unfortunately, the ending result of storing the data in redis is only the last record from the sql query.
How do I get all of the rows into redis with a hash tag of us-states-data-hash