I'm having a hellish time with a sql statement. I need to get nodes ("tnid" here) where a given user (uid = 1) has not translated a given language (language = "he", or rather, != as you'll see
( Read more... )
No, see that's not giving me what I need, either. Let's say that I want user 2 to get all the strings that she hasn't translated into Spanish yet.
mysql> select distinct tnid from fr_strings as st natural left join fr_tr_by_uid as ui where sid > 279 AND (uid is null OR language != "es"); +------+ | tnid | +------+ | 872 | | 873 | +------+
This doesn't work. You see, uid 2 DID translate 870 into Spanish, but not 871 (see the first results table). I need her to get 871 for translation still, but this query won't give it to her. I'm still stuck.
Comments 3
--Zach
Reply
Let's say that I want user 2 to get all the strings that she hasn't translated into Spanish yet.
mysql> select distinct tnid from fr_strings as st natural left join fr_tr_by_uid as ui where sid > 279 AND (uid is null OR language != "es");
+------+
| tnid |
+------+
| 872 |
| 873 |
+------+
This doesn't work. You see, uid 2 DID translate 870 into Spanish, but not 871 (see the first results table). I need her to get 871 for translation still, but this query won't give it to her. I'm still stuck.
Reply
Reply
Leave a comment