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
https://forums.phpfreaks.com/topic/7750-trouble-with-queries/
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
https://forums.phpfreaks.com/topic/7750-trouble-with-queries/#findComment-28563
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.