Xonk Posted January 24, 2007 Share Posted January 24, 2007 I'll admit up front that I have next to nill php or mysql experience. So pardon my ignorance if I'm using incorrect terms here. I've set up a from that allows a customer to submit information via text boxes and inserts to a mysql db.In the db table two records have default fields - order status (quote) and Province (ONT).If I don't tell the form to enter something into the two fields above I get a "column must not be null" message.If I force the form to submit information into the two fields 2 identical records are created (identical except of course for the auto incremented Primary key.)Not looking for a complete answer here just some direction as to where I should be looking. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 24, 2007 Share Posted January 24, 2007 [quote]If I don't tell the form to enter something into the two fields above I get a "column must not be null" message.[/quote]Looks like you will want to set you columns to [tt]NULL[/tt] instead of [tt]NOT NULL[/tt]. If you have PMA (phpMyAdmin) it is easy to do. Just login to PMA got to the table that has the quote and ONT columns, select the checkbox next to the two columns and click the pencil icon under the table.Now change the [b]Null[/b] column to value from NOT NULL to NULL click Save button to apply the changes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.