The following method returns an empty array
def self.select_where(column, value)
$db.execute(" SELECT *
FROM students
WHERE ? = ?", column, value)
end
while the one below returns the proper row of the table.
def self.select_where(column, value)
$db.execute(" SELECT *
FROM students
WHERE #{column} = '#{value}'")
end
What do I need to change to make the placeholders work? (sqlite3 gem)