Problem in Editing and Deleting Record

QuestionsProblem in Editing and Deleting Record
Viral asked 11 years ago

I have passed variable using POST method and in datagrid file I have written query as:
if (!empty($_POST['name']))
{
$_SESSION['na']=$_POST['name']
}
$fac=$_SESSION['na']
$g->select_command = "SELECT * FROM topicreport WHERE fac_name='" . fac . "'";
When I am using given POST and SESSION variable to write SELECT query then I am able to see records according to query but I am not able to "Edit" or "Delete" records but when I am using below written code:
$g->table = "topicreport"; OR
$g->select_command = "SELECT * FROM topicreport";
the I am able to Edit or Delete the Records.

Please Help

3 Answers
Chao Shun Jenq answered 11 years ago

try:
$g->select_command = "SELECT * FROM topicreport WHERE fac_name='$fac'";

Abu Ghufran answered 11 years ago

Hello,

Please debug the edit/del operations using firebug. It will tell the exact reason.

https://phpgrid.desk.com/customer/portal/articles/926266

Viral answered 11 years ago

Thanks there was a problem with concatenation in the query.
Once again thank you

Your Answer

2 + 18 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?