php - How to do an OR query in SQL -


I want to limit access to certain organizations only to certain organizations. user_id, username, organization_id organization_id, org_name category_ID, cat_name_range_formation_ category_id, organization_id

then my query becomes something like this -

  SELECT * FROM range from C INNER Include category_ cum cum on installation. Category_ID = c. Categorization_id and co.ystem_id = 'LOGGED_IN_USERs_ORGANISATION_ID'   

If I want to add an exception or even allow some users, then this table is my question -

  1. How can I do here or search so that the query returns the categories that are related to a given Organization ID or given User ID
  2. Send me the discussions < / Code> The table should have the same restriction if I made it ..

    Discussions

    discussion_id, discussion_title

    discussion_user

    discussion_id, user_id

    discussion_organization

    discussion_id, organization_id

    As you can see, I have to create the same table - do you think that I can get this main permission table for all of these products, categories, or any other new table?

    Please do one:

      SELECT * to category c INNER JOIN category_install c.category_id = c.category_id and co.organisation_id = 'LOGGED_IN_USERs_ORGANIZATION_ID' or c.category_id IN (SELECT category_user.Category_id WHERE category_user from category_user. User_id = 'LOGGED_IN_USERs_ORGANISATION_ID')    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -