Jump to content

Trouble with Queries


steve m

Recommended Posts

I'm not really sure if this is a PHP or MySQL question. We recently upgraded to PHP 5 and the newest version of MySQL. I think I figured out most of the setups, but for some reason if we try to submit a form either to UPDATE or to INSERT data in to the database, it would come back with an error saying, "Cannot execute Query". Through some checking I found out that if a form had some blank fields during the submission process the query would fail. This never happened when we used the previous versions of MySQL and PHP. In certain cases, we need to be able to submit forms with blank fields. I checked the database to make sure that the fields that we are having problems with allow "NULL", they do. Am I missing a setting in my .ini files? Or is this something that is new where you can't submit blank fields anymore? I could really use some insight to this problem.

Thanks.
Link to comment
Share on other sites

[!--quoteo(post=366402:date=Apr 19 2006, 08:18 AM:name=steve m)--][div class=\'quotetop\']QUOTE(steve m @ Apr 19 2006, 08:18 AM) [snapback]366402[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is there a way to change that? I'm not sure on hoe to do that.
[/quote]
Well, [a href=\"http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html\" target=\"_blank\"]this refman page[/a] discusses the various modes in gory detail. You probably just need to add the appropriate mode to your my.cnf file -- the one that emulates MySQL 4.
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.