Searching pgadmin db and grabbing information?

Posted by Bootstrotter on Stack Overflow See other posts from Stack Overflow or by Bootstrotter
Published on 2013-10-24T21:51:48Z Indexed on 2013/10/24 21:53 UTC
Read the original article Hit count: 223

Filed under:
|
|

I'm currently trying to write a script in RoR to go into my PGAdmin database and look at a list of users, THEN ignore users that have an image path but look at users who don't have one and then upload a link of a generic photo into their row. My database looks Something like this:

id
integer  |    name    |   email   |   image path   |

12            Bob       [email protected]    www.faces.org
81            Sally     [email protected]  
114           Mark      [email protected]  www.faces.org

How would I start grabbing those users, I only have 103 users right now, but I also need to think about scaling for the future. Here is a starting point. I know this is kind of vague but really all I need is just a starting point. to get into it. Thanks for the information.

require 'sqlite3'

db = SQlite3

users = users.find([1, 103])

Any help would be great.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about sqlite3