• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
again about the third parameter in join query

thank you so much for the last time
but still a got some problems abaut the same topic
I´m working with the normal join query(active record) but the field that I use to join those tables could be NULL in the table one and of course in the other table there´s no record, and that´s the reason why I don´t have a result in my query.
I was wondering that maybe one of those third parameters could do that kind of work that I need,
Table one Table two valor2
id valor valor1 id_table_one adfadf
5 adfad adfad 5
NULL adasd asdfad

what I´m tring to say is that in the join active record give me back the record in valor and valor1 even when the value of id is NULL in table one, but when that value is not NULL just make the simple query.
sorry abaut my inglish that´s why I did the example ..

[eluser]Pascal Kriete[/eluser]
No need to double post Smile .

What you're looking for is a left outer join. I'm not great at doing them, but wikipedia has some great explanations.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.