hi,
i am running a join query between the german_english table and the
user_todo_german_english tables, to figure out which words a user is
studying.
the key i am using is a combination of wordid + pos + posn (that is part
of speech == pos)
however, i am not able to correctly do the join because of improper
results.  please see the following


mysql> select * from user_todo_german_english where date_col >
'2006-04-22 07:00:00';
+---------+--------+------+------+---------------------+
| mb_id   | wordid | posn | pos  | date_col            |
+---------+--------+------+------+---------------------+
| curious |  94122 |    1 |    0 | 2006-04-22 07:04:26 |
| curious | 327400 |    1 |    0 | 2006-04-22 07:04:40 |
| curious | 327402 |    1 |    0 | 2006-04-22 07:40:41 |
| curious |  59553 |    1 |    0 | 2006-04-22 07:40:55 |
| curious |  86851 |    1 |    0 | 2006-04-22 08:14:12 |
+---------+--------+------+------+---------------------+
5 rows in set (0.00 sec)

mysql> select wordid,pos,posn from german_english where wordid in
(86851,59553);
+--------+------+------+
| wordid | pos  | posn |
+--------+------+------+
|  59553 | m    |    1 |
|  86851 | m    |    1 |
+--------+------+------+
2 rows in set (0.00 sec)

mysql> select * from user_todo_german_english where wordid = '86851' and
posn = '1' and pos = 'm' AND mb_id='curious';
+---------+--------+------+------+---------------------+
| mb_id   | wordid | posn | pos  | date_col            |
+---------+--------+------+------+---------------------+
| curious |  86851 |    1 |    0 | 2006-04-22 08:14:12 |
+---------+--------+------+------+---------------------+
1 row in set, 1 warning (0.00 sec)

mysql> select * from user_todo_german_english where wordid = '86851' and
posn = '1' and pos = 'm' AND mb_id='curious';
+---------+--------+------+------+---------------------+
| mb_id   | wordid | posn | pos  | date_col            |
+---------+--------+------+------+---------------------+
| curious |  86851 |    1 |    0 | 2006-04-22 08:14:12 |
+---------+--------+------+------+---------------------+
1 row in set, 1 warning (0.00 sec)

mysql>                                                  

clearly, pos is ZERO in the database, and the letter 'm' in the query.
or is my brain farting again?


-- 
my site <a href="http://www.myowndictionary.com";>myowndictionary</a> was
made to help students of many languages learn them faster.






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to