28 dbh = get_connection
29 res = dbh.exec("select max(ogc_fid) from #{table};")
30 max = res[0]
31
32 puts max
Which successfully prints the SQL query to the terminal. I want to be
able
to use the result later in the code, but I’m not really clear what type
of
object is being returned. How can I figure out what is being returned
and
convert it to an integer or a string?
Which successfully prints the SQL query to the terminal. I want to be able
to use the result later in the code, but I’m not really clear what type of
object is being returned. How can I figure out what is being returned and
convert it to an integer or a string?
i’m not quite sure what you’re asking, but i think exec returns rows.