[thelist] weird MySQL insert problem

David Kutcher david_kutcher at hotmail.com
Fri Mar 1 00:21:01 CST 2002


> ******
> mysql> INSERT INTO candidate_information (can_id) VALUES ('999');
> Query OK, 1 row affected (0.00 sec)
>
> mysql> SELECT * FROM candidate_information WHERE can_id = 999;
> Empty set (0.06 sec)

When you created the table, did you make the can_id column an INT or a
VAR/CHAR?

If it's a VAR/CHAR, it's treating it as a string, which would mean that you
need WHERE can_id = '999'

If it's a INT, you'd be able to use WHERE can_id = 999

Also, maybe you're not adding the row.  If you do a SELECT * FROM
candidate_information; do you get results and is can_id = 999 one of them?

Just checking the basics...

David
www.confluentforms.com




More information about the thelist mailing list