Jump to content

[SOLVED] Selecting and ignoring issue - plz help


nezbie

Recommended Posts

Hi

 

I have a table consisting of following data:

 

id

name

languages_id

 

None of those fields are unique, so one id can have multiple languages_id's.. My problem is, that I'd need to select all id's from the table where languages_id has a value of x, but not y.. So the idea in php is to copy all the fields to language y if it does not exists.. Example:

 

id            name              languages_id

10          frontpage        1

10          startseite        2

20          information      1

 

id 20 does not exists in german (languages_id = 2), select this id. I've tried like (as simple as I thought it COULD be.. wasn't):

 

SELECT DISTINCT id FROM table WHERE languages_id = "1" AND languages_id != "2"

 

I'll try to work this out

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.