I have this table:

CREATE TABLE texts (
  textid mediumint(9) NOT NULL auto_increment,
  languageid char(2) NOT NULL default 'da',
  textkey varchar(32) NOT NULL default '',
  textvalue text NOT NULL,
  PRIMARY KEY  (textid),
)

It could contain these data:
(textid,languageid,textkey,textvalue)
1    da    kb1    tastatur1
2    en    kb1    keyboard1
3    da    mo5    skærm5
4    en    sc2    scanner2

In PHP i have to variables. One called:
Primlanguage, and one called:
Seclanguage.

In this example 
Primlanguage contains 'da' and
Seclanguage contains 'en'.

Is it possible to make a query in MySQL, which could return row 1,3 and 4 based on 
these conditions?

What i really want the query to do, is to return a row where Primlanguage = languageid 
and only to return a row where Seclanguage = languageid if there has not been returned 
any other rows with the same textkey.

Did you get that?

thanx in advance!

Greetings,
Stig


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to