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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.