Jump to content

[SOLVED] Selecting and ignoring issue - plz help


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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.