php - Datatables Serverside Processing with Column Filterting using Multiple Tables -
i'm displaying record set using datatables
pulling records 2 tables.
table a
sno | item_id | start_date | end_date | created_on | =========================================================== 10523563 | 2 | 2013-10-24 | 2013-10-27 | 2013-01-22 | 10535677 | 25 | 2013-11-18 | 2013-11-29 | 2013-01-22 | 10587723 | 11 | 2013-05-04 | 2013-05-24 | 2013-01-22 | 10598734 | 5 | 2013-06-14 | 2013-06-22 | 2013-01-22 |
table b
id | item_name | ===================================== 2 | timesheet testing | 25 | vigour | 11 | fabwash | 5 | cruise |
now since number of records returned going turn big number in near future, want processing done serverside. i've managed achieve came @ cost. i'm running problem while dealing filters.
from figure above, (1) column value in int
(item_id
), using small modifications inside while
loop of mysql resource, i'm displaying corresponding string
using table b
.
now if use filter (2), working fine since values come table a
the problem
when try filter field (3), if enter string
value such fab
says no record found. if enter int
such 11
single row contains fabwash
item name.
so while filtering i'm required use direct value used in table a
, not corresponding string
value stored in table b
. hope point i'm putting across understandable because hard explain in words.
i'm clueless on how solve issue.