Get An Array Of Values From The Database
Last updated
Was this helpful?
Last updated
Was this helpful?
We generally get data from our database through :
If we need to do a more specialized query, we might reach for :
The results are bundled up in a predictable, but verbose array of hashes.
We could trim the result down to just the values using either or :
If the SQL statement is to return more than one row in the result, then you'll want select_rows
instead of select_values
.