MyBB Community Forums

Full Version: Problem in db->update_query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
There is a problem in MySQL and MySQLi update_query.
Some times I need to save settings like numeric passwords or usernames that starts with a zero and must save in string, but in update_query the value stores like numeric and first zero will be removed

For example I need to save this username: 0912244
But in database stored: 912244


				if(is_numeric($value))
				{
					$query .= $comma."`".$field."`={$value}";
				}
				else
				{
					$query .= $comma."`".$field."`={$quote}{$value}{$quote}";
				}
This is caused by this issue: https://github.com/mybb/mybb/issues/1933