Question: I am using a GROUP\_CONCAT() to display multiple category's but i am not getting an exact result. for table join i am using an IN() clause please help me on this.

> 
> The query only displays a single category. in database category id store like 2,5,8
> 
> 
> 

```
$sql = "SELECT u.*, GROUP_CONCAT(c.name SEPARATOR ',') as cname, s.name as sname
        FROM course u        
        INNER JOIN category c ON c.id IN (u.category_id) 
        INNER JOIN status s ON s.id = u.status_id
        WHERE u.is_deleted = 0 AND u.id = $id $app
        LIMIT 1";

```

I want multiple categories from the category table.

Answer: 
You can use the ES6 arrow function and pass the additional arg. (event) though that.

```
<Input onChange={(event)=>this.props.updateQuantity(event,item.id)} defaultValue={item.unit_quantity || ""}/>

```

and in the parent component use as it is: 

```
updateQuantity = (event,id) => {
    console.log(event, id)
    // Rest of the code...
}

```
The child which renders the input could have an intermediate function that serves to call the `updateQuantity` function from the props with the right parameters.

So you change the function passed to the input onChange to a local function in the child:

```
<Input onChange={this.updateQuantity} defaultValue={item.unit_quantity || ""}/>

```

Then you create the function within the child like so:

```
updateQuantity = (e) => {
    this.props.updateQuantity(e, this.props.id);
}

```

This will call the parents function with whatever parameters you want. I'm assuming your child has its id stored within a prop but you can change it to wherever it's stored.