The first sorry for my English, i'm spanish
I have a problem. I want to do a (WHERE) of a table whit relations.
The relations don't give errors:
$crud->set_relation('MEMBER','members','{NAME}.{APELLIDOS}');
$crud->set_relation('USER','user','{NAME},{APELLIDOS}');
and the WHERE too:
$crud->where('MEMBER',$_SESSION['code']);
both things separately work fine, but if we mix them:
an error appears, (but only if the field MEMBER is not primary key of the table)
this is error in the select:
A Database Error Occurred
Error Number: 1052
Column 'MEMBER' in where clause is ambiguous
SELECT `visitas`.*, CONCAT('', COALESCE(j0d9372a2.NAME, ''), ' ', COALESCE(j0d9372a2.APELLIDOS, ''), '') as s0d9372a2, CONCAT('', COALESCE(j422560cb.NAME, ''), ' ', COALESCE(j422560cb.APELLIDOS, ''), '') as s422560cb, CONCAT('Desde: ', COALESCE(j6bea6422.INICIO, ''), ' Hasta: ', COALESCE(j6bea6422.FIN, ''), '') as s6bea6422 FROM (`visitas`) LEFT JOIN `visitadores` as j0d9372a2 ON `j0d9372a2`.`MEMBER` = `visitas`.`MEMBER` LEFT JOIN `usuarios` as j422560cb ON `j422560cb`.`USER` = `visitas`.`USUARIO` LEFT JOIN `agenda` as j6bea6422 ON `j6bea6422`.`CITA` = `visitas`.`CITA` WHERE `MEMBER` = '1' LIMIT 25
Filename: myurl
Line Number: 330
something idea??
very thanks for the help and for the wonderfull GROCERY CRUD