hi list -
cant find any decent mysql/ruby usage examples, any suggestions? even
the dave thomas book has very little…
i have a sql statement which sometimes returns a single value, and
sometimes it cant find a matching result.
how do i trap this nothing value? it doesnt seem to be a “nil” : the
return type is always:
which is not a hash, so i cant get the keys or count() or anything…
itemCount = res.keys.length
#> NoMethodError: undefined method ‘keys’ for #
if ( res.nil? ) // never is tho…
also how do i extrac the first and only result? eg if the result is
not a list of items, but just reding the value of one field?
David "DC" Collier
+81 (0)80 6521 9559