Okay
  Public Ticket #1603295
User_id
Closed

Comments

  •  1
    PMB2169 started the conversation

    Hi,

    A quick question on user_id private editable content.

    I have a very large db (4.5 million rows) which has to be displayed using mysql query.

    I would like to allow users to edit their own content which has a fk reference to a notes table.

    The issue I seem to be having is displaying the shared content and private content together.

    Example table…

    SELECT
    company_data.company_id,
    company_data.name,
    company_data.address,
    notes.user_id,
    notes.notes_1
    FROM (company_data
    JOIN 'notes' ON 'company_data'.'company_id' = 'notes'.'company_id')


    If the user has no data in the private table, no rows are displayed even from the shared content.

    So.. I must be doing this wrong.

    For users to have private editable data, do they have to have their own notes table pre-set with a company_id and user_id or can I set one single editable notes table that would be shared?

    Thanks in advance,

    Paul

  •  471
    Isidora replied

    HI Paul,
    Thank you for your purchase.

    Well you can set one single editable notes table that will have columns that you need and you can control for which users can be available. Our plugin is based on that you can edit only one table in database.You can read more about Foreign key: Creating table relations in WordPress tables in our documentation.

    "For users to have private editable data, do they have to have their own notes table pre-set with a company_id and user_id "

    Sorry can you explain me this in little more details or send me some screenshots or screncast so I can gave you my suggestion.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  1
    PMB2169 replied

    Hi Milan,

    I think you've answered the question with "Our plugin is based on that you can edit only one table in database."

    So to confirm, if user_id 1 edits notes_table_a row 1, user_id 2 would not be able to edit or view row1, they would require a separate table i.e. notes_table_b.

    BR

    Paul

  •  471
    Isidora replied

    HI Paul,

    Sorry for late response. 

    We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.

    I said that because of your query where you are using columns from two tables(company_data and notes)

    When you are using option Users can see and edit own data  and you have table with all users, users will see only own data if they have it and if don't they will be seeing empty table.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables