skip to Main Content

I want to use Adminer Editor to allow users to change rows in one table.
I use this function to limit users to see only the table I want:

function tableName($tableStatus) {
    if($tableStatus['Name']==$TABLE_NAME)
        return $TABLE_NAME;
}

But – I want the users to change only rows with a certain condition (for example: branch_id=10).
Who can I do this?

2

Answers


  1. Chosen as BEST ANSWER

    I found an ugly way to do it:

    function selectQueryBuild($select, $where, $group, $order, $limit, $page){
        return "SELECT * FROM `TABLE_NAME` where BRANCH_ID=10";
    }
    

    Unless someone has a better solution, this changes all the query that will be done but it'll do the job.


  2. You can use the following query To limit users to only modifying rows with a certain condition

    UPDATE table_name
    SET column1 = value1, column2 = value2, ...
    WHERE branch_id = 10
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search