Welcome Guest, Not a member yet? Register   Sign In
the Join() and primary field
#1

When I use the join() the data returned is mixed.
example:
- [table-one] with field: [id] (primary/autonumber)
- [table-two] with fields: [id] (primary/autonumber), [idTable-one] (index)

The code:
Code:
$mymodel = model(MyModel::class);
$data = $mymodel->join('table-two', 'table-two.id = id', 'left');

in the view file, the array: $data['id'] have the value of table-two, not of table-one.

Why?

Thanks in advance..
Reply




Theme © iAndrew 2016 - Forum software by © MyBB