mysql - PHP MySQLi can't update field where specific BIGINTS -
i update on 50000 rows bigint 13 - 14 numbers long. there (very few, under 0.01%) ints can't use update fields. try yourself:
create table(artikel) fields:
field(bigint)value4030521732735stuff(text)valueabc
and try:
mysqli_query($con, "update artikel set stuff = 'newabc' field = 4030521732735"); isn't field getting updated too? if yes, wrong int? ideas how fix this? sorry bad english
update:
i tried it's not working:
$bigint = gmp_init("4030521732735"); $bigint_string = gmp_strval($bigint); mysqli_query($con, "update test set stuff = 'newabc' field = $bigint_string"); and
$int = strval("4030521732735"); mysqli_query($con, "update test set stuff = 'newabc' field = $int");
this problem had in fact nothing ints or bigints or whatever... quite long discussion brought conclusion strings not escaped before sending db (strings occasionnaly containing quotes) ;-)
Comments
Post a Comment