[eluser]tarciozemel[/eluser]
[quote author="John Murowaniecki" date="1330440901"]I think the rule is to use <=> to compare numbers, dates and values and measurable
!=,
= for text and other information (texts). From what I tested here
<> and
!= had the same result using
int and
varchar fields data.. I believe it is only a convention, a model, a pattern, but I don't think its necessary to closely used in this way - since we can use
!= to
validate numerical values as well.
The same behavior was
float and
text field data - tested with small numbers (I don't know how it behaves with large numbers, also I doubt my ability to make a test - or series of tests - to validate this theory).
In short: despite having different purposes '
!=' and '
<>' showed the same results.
Acredito que a regra seja utilizar <=> para comparações entre números, datas e valores mensuráveis e !=, = para textos e outras informações (textos). Pelo que testei aqui '<>' e '!=' tiveram o mesmo resultado utilizando campos int e varchar.. Acredito que seja apenas uma convenção, um modelo, um padrão, mas não creio que seja estreitamente necessário utilizar dessa forma - visto que podemos utilizar != para validar valores numéricos também.
O mesmo comportamento teve float e text - porém efetuei testes com números pequenos (não sei como se comportaria com números grandes, igualmente duvido da minha capacidade de efetuar um teste - ou série de testes - que validem essa teoria).
Resumindo: apesar de terem propósitos diferentes '!=' e '<>' apresentaram os mesmos resultados.
P.S.: I wrote in brazilian native language 'cos I believe I wasn't cleary enough.
Escrevi em brasileño pois creio não ter sido suficientemente claro.
This sugar melts my brain..[/quote]
Seem like the problem is not the operator, but DM removing any kind of stuff in that sintax, always using the "="...
Anyway, I did it using
Code:
where_not_in_related('segment', 'foo', 0);
But I don't know about the performance of this... Anyhow, thanks!
PS: Legal você saber escrever em "brasileño"! ;-)