ThinkPHP adopts thinkPHP framework and jqueryEasyui technology.
The question about how to format the time field of the retrieved data in the action to "12:00:00. ,
Not much nonsense, texture:
[Front-end Page ]:
There are two tables in the background: the customer table and the account table. The associated model is used. On the front-end page, if you want to display the name field in the customer table, how do you write table column fields in js?
[Page js ]:
How does one display the name field of the customer table?
Why cannot I "{field: 'Customer. name', title: 'customer name', width: 100, resizable: true, sortable: true, align: 'right?
How to use field? cannot It be associated with table data?
[Background action ]:
Also, how to display the time on the front-end page in the format of "12:00:00. The background database stores the UNIX timestamp.
I want to first convert the time format in the action and then display it on the page. How to write?
Reply to discussion (solution)
Date ("Y-m-d H: I: s", timestamp), h lowercase represents 12-hour
Jquery easyui solves the field problem of querying foreign key objects!
The name field of the foreign key object customer is retrieved successfully.
Foreground page effect:
The js code is as follows:
The background action uses join queries. The key is $ model-> relation ("customer"). where ($ map)-> select ();