Procedure record

QuestionsProcedure record
C3media asked 7 years ago

Hi Abu,

Right now I'm trying to add a custom MySql query for a procedure record; this is query:

$mysqli->query("INSERT INTO TABLE(id) VALUES ($VAR1), ($VAR2), ($VAR3)")) {
echo "Failed insert in TABLE: (" . $mysqli->errno . ") " . $mysqli->error;

My Question: It's possible to assign $VAR1, $VAR2, $VAR3 to fields in grid on insert?



3 Answers
Abu Ghufran answered 7 years ago

If $VAR1,2,3 are php variables then yes, it is supported and should work.
For debugging, try printing $mysqli->error and see log in ajax response as mentioned in url:

mrssam answered 7 years ago

hello , Thanks Abu Ghufran you have nice script , in this Question you answer yes i possible , can you give us an example please


Abu Ghufran answered 7 years ago

You can review demos/editing/custom-events.php for using on_insert event handler.
In that, you will see all data posted from phpgrid form is present in $data array.

Your Answer

12 + 14 =

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?