I am having trouble to remember the solution of a simples problem. There is a condition you put on a select to bring only one specific tuple from a table or the whole table. Ex:
select * from user
where (ID_user = :iduser or BLABLABLA)
The BLABLABLA part is the one I don't remember! The thing is that if I pass a invalid id, like a negative number, it will return all the tuples of the table. In the other hand, if a pass a actual id it will return me only the specific tuple.
Does any one have seen it before! I have used it a year ago, but I can't remember!
Thanks!
select * from user
where (ID_user = :iduser or BLABLABLA)
The BLABLABLA part is the one I don't remember! The thing is that if I pass a invalid id, like a negative number, it will return all the tuples of the table. In the other hand, if a pass a actual id it will return me only the specific tuple.
Does any one have seen it before! I have used it a year ago, but I can't remember!
Thanks!