2011/10/9 Tom <[email protected]>:
> How do you insert information like this into sql?
> I tried:
>
> db.insert('users', username=info['user'],
> password="PASSWORD('"+info['password]'+'")" )
>
> but that puts this in literally, so the password then becomes
> "PASSWORD('password')", instead of hashing it. i didn't see anything
> in the API, but clearly this must exist.

You can do this:

db.query("INSERT INTO users (username, password) VALUES ($user,
PASSWORD($password)", vars=info)

Anand

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to