Title: Foreig key Post by: alexcbn on May 16, 2013, 11:12:49 AM Hi, I have a simple question, but I don´t know how to resolve..
In a table 'users' I put a foreign key 'id_city', with your source in table 'city'. But, how shows in a grid the field 'name_city'? <table id="dg" title="My Users" class="easyui-datagrid" style="width:700px;height:250px" url="get_users.php" toolbar="#toolbar" pagination="true" rownumbers="true" fitColumns="true" singleSelect="true"> <thead> <tr> <th field="firstname" width="50">First Name</th> <th field="lastname" width="50">Last Name</th> <th field="id_city" width="50">City</th> <----here I want show field 'name_city', of table 'city' <th field="email" width="50">Email</th> </tr> </thead> </table> []´s Title: Re: Foreig key Post by: 2plus2 on May 16, 2013, 06:28:59 PM What does your JSON look like that is returned by get_users.php ?
Title: Re: Foreig key Post by: alexcbn on May 16, 2013, 07:07:58 PM Hi 2plus2, I get resolved using INNER JOIN.
Thank´s for your reply! |