solesz
Posts: 137
|
| Posted: 06/06/2011, 10:28 AM |
|
Hi,
I have a sepcific problem:
Database:
- datatable1: contains employee names
- datatable2: contains presence information for employee per date (presence type is listbox)
Operation:
- On a given date: originally no presence data for employees
- When presence info is recorded, on a given date not all employee will has presence info
How to prepare an editable grid (or something is better?)
- which is listing all employees
- already recorded presence information where available (can be modified - listbox))
- where no presence information yet, then default presence type, as default element of listbox
- and when I send the form, depending the situation it INSERTS, or UPDATES the record in datatable2?
Any ideas, or reference to forum topic dealing with this kind of problems?
thx,
solesz
edit1: the database is MySQL, so maybe the "INSERT ... ON DUPLICATE KEY UPDATE" technic can be applied somehow...
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 07/21/2011, 6:26 PM |
|
solesz,
Have you resolved this or do you still need assistance?
|
 |
 |
solesz
Posts: 137
|
| Posted: 07/21/2011, 9:36 PM |
|
Hi Mambo,
Workaround has been done, but still very interesting in a straightforward solution. My workaround is based fully on custom code, then everything pushed into a template variable.
Now, when I pick a date, the rows contain employees' names, columns contain one week period from the chosen date, and fields are prefilled with preloaded data from DB or default value. Then Insert ... On duplicate key is used.
But I would prefer editable grid solution.
Solesz
|
 |
 |
|