in reply to DBD::Pg problems

Doink! The problem is that when the statement is executed, $password1 isn't being wrapped in '':
dbd_st_execute: statement = >INSERT INTO users (user_name, user_passw +ord, user_birthdate, user_homepage, user_email) VALUES ('dstar', sh! +tupid!testpasswd, '11/14/1972', 'http://pele.cx/~dstar', 'dstar@pele. +cx')<

Why is that happening, and how do I fix it?

Replies are listed 'Best First'.
Re: Re: DBD::Pg problems
by VSarkiss (Monsignor) on Aug 10, 2001 at 20:06 UTC

    What's the data type of users.user_password in your database? Apparently DBD::prepare thinks it's not a char(n).

    Here's another possibility. This line: % } elsif ($password1 != $password2) {should probably be: % } elsif ($password1 ne $password2) {The numeric comparison makes me suspicious. Could it be causing DBD::execute to conclude that it doesn't need to be wrapped in quotes?

      That was it exactly. The worst part is, I looked at it last night and thought 'That isn't right'. Too much time awake, not enough coffee last night. Thanks.