EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 03:28:14 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Foreig key
Pages: [
1
]
« previous
next »
Print
Author
Topic: Foreig key (Read 9025 times)
alexcbn
Newbie
Posts: 4
Foreig key
«
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
Logged
2plus2
Jr. Member
Posts: 75
Re: Foreig key
«
Reply #1 on:
May 16, 2013, 06:28:59 PM »
What does your JSON look like that is returned by get_users.php ?
Logged
alexcbn
Newbie
Posts: 4
Re: Foreig key
«
Reply #2 on:
May 16, 2013, 07:07:58 PM »
Hi 2plus2, I get resolved using INNER JOIN.
Thank´s for your reply!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...