Re: Re: Subselect ?
| From: | Christine Clerc | Date: | Fri, 16 Jan 2004 18:10:32 +0000 |
| Subject: | Re: Re: Subselect ? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32455@lists.php.net to get a copy of this message | ||
Well, I had tried this :
SELECT DISTINCT id_script FROM readme WHERE id_language = $languageorignin;
But then I have to do this with the selection :
SELECT DISTINCT id_script FROM readme WHERE id_language != $languagetarget;
but it cannot work since I get back the id_script from the first selection !
See a sample of the table :
id_readme, id_script, id-language
1, 2, 4
2, 3, 1
3, 3, 4
4, 4, 4
All the scripts are in english, but one has been already translated into French.
I want to say to the translator that works from english to french,
1) you have script 2 and 4 to translate
2) you can rewrite the translation of script 3 (this second question I have manage with creating a temporary table).
I don't think the newest version of mysql will be on the server.
Thank you
Christine
try this SELECT DISTINCT id-script FROM YOURTABLE where id_language = 'SELECTED LANGUAGE' ; no ? Justin Patrin wrote:Christine Clerc wrote:-- Alban Médici R&D software engineer ------------------------------ you can contact me @ : alban.medici@fr.netcentrex.net http://www.netcentrex.net ------------------------------ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpHi, I have a Mysql table of texts in different languages : id_readme id_script (the object that the text describes) id_language (the language the text is written in) etc. So two texts may have the same id_script but with different id_language. I need to retrieve the list (without duplicate) of id-script that are described in one language and NOT in another. Is there hope ? Any help would be welcome. ChrisMaybe give us a sample of the SQL you wish to use? You can probably get it done without a sub-select. That being said, the newest versions of MySQL support sub-selects, but you'd have to use an unstable version.