PHP Classes

After delete - no where clause

Recommend this page to a friend!

      phpMyDataGrid - AJAX Enabled Datagrid  >  All threads  >  After delete - no where clause  >  (Un) Subscribe thread alerts  
Subject:After delete - no where clause
Summary:where is lost after deletion or sorting
Messages:3
Author:azwar
Date:2011-06-20 09:43:57
Update:2011-06-21 09:00:36
 

  1. After delete - no where clause   Reply   Report abuse  
Picture of azwar azwar - 2011-06-20 09:43:57
hi, Thank you for reading

scenario
--------

I set this to view training data for particular staff..

$rp_no=$_POST['rp_no']; // read from other page
$objGrid->where("rp_no = '$rp_no'");

for example; rp_no is 123 and system will view all training data belong to staff number 123 and it work fine.

rp_no training title
123 xxx
123 yyy

the problem is after i have done deletion on yyy or sorting , system will reload and show all data in entire database.

It seem like the where statement is lost.
Does anybody know how to fix this?

Thank you, Azwar

  2. Re: After delete - no where clause   Reply   Report abuse  
Picture of Gustavo Arcila Gustavo Arcila - 2011-06-20 11:43:40 - In reply to message 1 from azwar
You must propagate the parameters by using linkparam method

$objGrid->linkparam("rp_no=".$rp_no);


  3. Re: After delete - no where clause   Reply   Report abuse  
Picture of azwar azwar - 2011-06-21 09:00:36 - In reply to message 2 from Gustavo Arcila
Thank you.. it works..