Jump to content

newie problem


Xonk

Recommended Posts

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.



Link to comment
https://forums.phpfreaks.com/topic/35531-newie-problem/
Share on other sites

[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.
Link to comment
https://forums.phpfreaks.com/topic/35531-newie-problem/#findComment-168429
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.