2015-05-17, 10:29 AM
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
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}";
}