php - How to retrieve query stored in session in codeigniter? -
while using codeigniter have saved current query in session can show pagination in detail page means prev/next button detail screen.but when use %10% in query shows in home page stored in session when go detail page not in session.any guess not storing session in database documented in user guide
my query simple
select contac.cm_id contact left join employer on (contact.c_id = employer.ei_contact_id) , (employer.ei_primary_employer = "y") ( contact.cm_staff_name '%s%' , contact.cm_staff_name not 'null' ) order contact.cm_id asc
so when there 03 in contact.cm_staff_name '%03%'
not passing query 1 page through session . please suggest if better solution instead of using session. guess
there no point in storing a program anywhere.
program have written in constant form , fed dynamical variables.
using sessions pagination wrong idea - @ google example - use query string pass variables next page. let user bookmark page or send friend or whatever. always pain when friend sends link have no session , cannot see see.
so, write query right in code
pass variables via query string
, use prepared statements insert variables query
Comments
Post a Comment