Timo Timo - 1 year ago 140
CoffeeScript Question

why does my insert sql query always return undefined?

why does this sql-query always return the row as undefined??


data.get "insert into users (name, password)
values ('#{user.name}', '#{user.password}')", (err, row) ->


dmg dmg
Answer Source

data.get is for queries, not for selects. What is happening is that the statement returns an error.

See this for a tutorial on how to insert tuples:

Intro to Coffee Script and SQLite

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download