Not Solved 1364 - Field 'thx' doesn't have a default value
#1
Not Solved
When I Submit Registration This Sql Error Showing..
I Uninstall All Plugin But Problem Not Solve Kindly Help Me..
See ScreenShoot For More

Forum Url : http://www.tezforum.com/forum/

   
Khan Solangi Professional Web Designer In Pakistan.
Reply
#2
Not Solved
Moved to Plugin Support.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
Not Solved
It looks like you have a Thanks plugin installed, if you don't want that plugin you can remove the 'thx' column from the mybb_users table, or if you do want the plugin, you'll need to set a default value for the column. You can do both of these things in phpMyAdmin.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#4
Not Solved
how can i do this Tell Me Step By Step

anyone help me
Khan Solangi Professional Web Designer In Pakistan.
Reply
#5
Not Solved
Hello
I have the same problem
Explain one person clearly
Reply
#6
Not Solved
It is due strict mode enabled. Try another plugin related to thanks system.

Use thankyou mybb system.

Upload files and you have to uninstall it.

Click install then uninstall.

Now try it and problem have to go. Even you can install system to use it or do not.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply
#7
Not Solved
hello , i have this problem after upgrade my forum from 1.8.22 to 1.8.23 When the user registers

SQL Error:
1364 - Field 'thx' doesn't have a default value

I removed the plugin and reinstalled it but the problem was not resolved. Can you help me?
I use the following attached plugin.There is a problem when the plugin is active

   


Attached Files
.php   thx.php (Size: 24.89 KB / Downloads: 4)
Reply
#8
Not Solved
You have to modify the plugin to add default values:
function thx_install()
{
	global $db;
	
	$db->query("CREATE TABLE IF NOT EXISTS ".TABLE_PREFIX."thx ( 
		txid INT UNSIGNED NOT NULL AUTO_INCREMENT, 
		uid int(10) UNSIGNED NOT NULL, 
		adduid int(10) UNSIGNED NOT NULL, 
		pid int(10) UNSIGNED NOT NULL, 
		time bigint(30) NOT NULL DEFAULT '0', 
		PRIMARY KEY (`txid`), 
		INDEX (`adduid`, `pid`, `time`) 
		);"
	);
	
	if(!$db->field_exists("thx", "users"))
	{
		$sq[] = "ALTER TABLE ".TABLE_PREFIX."users ADD `thx` INT NOT NULL DEFAULT , ADD `thxcount` INT NOT NULL DEFAULT 0, ADD `thxpost` INT NOT NULL DEFAULT 0";
	}
	elseif (!$db->field_exists("thxpost", "users"))		
	{
		$sq[] = "ALTER TABLE ".TABLE_PREFIX."users ADD `thxpost` INT NOT NULL DEFAULT 0";
	}
	
	if($db->field_exists("thx", "posts"))
	{
		$sq[] = "ALTER TABLE ".TABLE_PREFIX."posts DROP thx";
	}
	
	if(!$db->field_exists("pthx", "posts"))
	{
		$sq[] = "ALTER TABLE ".TABLE_PREFIX."posts ADD `pthx` INT(10) NOT NULL DEFAULT 0";
	}
	
	if(is_array($sq))
	{
		foreach($sq as $q)
		{
			$db->query($q);
		}
	}
}

Modified file is in post #10
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#9
Not Solved
thanks. The problem was fixed
Reply
#10
Not Solved
I didn't look at every fields, sorry.
Here is the new modified one.


Attached Files
.php   thx.php (Size: 24.92 KB / Downloads: 9)
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)