Jump to content

[SOLVED] Find override


ramli

Recommended Posts

I have the following querys:

 

query1:

SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009'

 

query2:

SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE Gebruikersnaam LIKE '%raman%' OR Voornaam LIKE '%raman%' OR Achternaam LIKE '%raman%' OR Tussenvoegsel LIKE '%raman%' OR Klasnaam LIKE '%raman%' AND Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009'

 

When i add the FIND to the query it ignores the Gebruikersrol, Actief and Gebruikersrol restriction and display's all records. I want to search the database with the restrictions in place.

 

What am i doing wrong? any help will be much apreciated.

Link to comment
Share on other sites

Looked it up in the dictionary and tryed..

 

SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE (Gebruikersnaam LIKE '%test%' OR Voornaam LIKE '%test%' OR Achternaam LIKE '%test%' OR Tussenvoegsel LIKE '%test%' OR Klasnaam LIKE '%test%') AND Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009'

 

and it works perfectly.

 

Thx for the help.

Link to comment
Share on other sites

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.