MySQL/MariaDB BigInt Primary Key ID not working in Where

Again, you are right. I too tend to just switch to custom query, every once in a 1000 queries that fails. Have done the same for this one in my code.
But it seemed very simple and direct and something that should work out-of-the-box. So had to report it.

PHP support for native bigint is not that great and emerged recently. It is also very much dependent on the system supporting it. Like 32 bit or 64 bit and the constant PHP_INT_MAX

That is why when there is no support the big mint is for safety stored as string to not get lost.

See:

https://www.php.net/manual/en/language.types.integer.php

https://wiki.php.net/rfc/bigint

So this is actually something with PHP not the database query.

So that could be the reson why it works for Teodor but not me?

Did not understand the article to be honest. Went over my head.

Looks like this is from 2015, last modified 2017, and its status is withdrawn.

So you mean to say the query builder UI is dependent on PHP, but custom query builder is not? Because same query is working fine in custom.

Hmm that is weird, could post the custom query and it’s output? Maybe the normal query has a bad mapping to PDO with bigint, that seem to be a common PDO problem as well. @patrick can check it

QUERY:

OUTPUT:

You said custom query is working…? So what exact is working and what not?

Did you pass the filter value as parameter?

Custom query builder returns the value.
Multiple/Single query builder does not return the value.

But why you enter the value statically? That will never be the case - try to bind it in both with parameter

Created a variable to hold the value:
image

Bound the param in DB to that (similar in custom query):
image

Now both don’t return any value:
image

For my task here, I had a static value to work with, so did not test with a param binding.

And if you enter the value from other source like $_GET.id so you can enter if from the query string for example?

Left office for the day. Will try to reply with results tomorrow.

@Teodor Can you please close this? I did not get time to reply earlier and now I don’t have a use case to test one.
Will re-open a new report if I encounter this again.
Thanks.