Action Validated

QuestionsAction Validated
Sochi asked 4 years ago

Dear Abu,
I want to distinguish the query command based on action (Add or Edit). For example:

if action is in mode = Add, then

$str = $grid->get_dropdown_values("select distinct category_id as k, category_name as v from event_category
WHERE category_id=".$_SESSION['category']);

if action = Edit, then

$str = $grid->get_dropdown_values("select distinct user_id as k, user_name as v from event_name
WHERE category_id=".$_SESSION['category']);

Is this possible? Thanks

1 Answers
Abu Ghufran answered 4 years ago

One option is to make 2 columns. One for query1 and other for query2.
And display column one only on add, and other one only on edit.

e.g.
$col["show"]["add"] = true;
$col["show"]["edit"] = false;

Your Answer

6 + 3 =

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 / 5. Vote count:

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

Let us improve this post!