halojoy wrote:yes.
you need a query that takes word by word from row in terms_engtolt
and search for it in terms_lttoeng table
where terms_engtolt is:
id - help me now - ytem mi nut
and terms_lttoeng is:
id - ytem mi nut - help me now
... and when found what to do??
... and where do the 2 tables:
id, word, translation
... come in ???
... and when found [b]what to do??[/b]
replace matched word to same word just linked to translation.
for e.g.
there was eng to lt translation
Camp - stovyklaviete kur zmones gyvena.
and there was match from lttoeng: stovyklaviete, zmones.
so then it should replace translation to:
Camp - <a href=#id_retrieved_from_lttoeng>stovyklaviete</a> kur <a href=#id_retrieved_from_lttoeng>zmones</a> gyvena.
... and where do the 2 tables:
[b]id, word, translation[/b]
... come in ???
--
-- Database: `dictionary`
--
-- --------------------------------------------------------
--
-- Table structure for table `terms_engtolt`
--
CREATE TABLE `terms_engtolt` (
`id` int(11) NOT NULL auto_increment,
`term` varchar(255) NOT NULL,
`translation` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `word` (`term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=27146 ;
-- --------------------------------------------------------
--
-- Table structure for table `terms_lttoeng`
--
CREATE TABLE `terms_lttoeng` (
`id` int(11) NOT NULL auto_increment,
`term` varchar(255) NOT NULL,
`translation` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `word` (`term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=361 ;
btw. here is working example of what I need from our concurents:
http://www.anglu-lietuviu.com
see how they show theyr translations.