Procedure record

QuestionsProcedure record
C3media asked 10 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?

Regards!

Disson

3 Answers
Abu Ghufran answered 10 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:
https://phpgrid.desk.com/customer/portal/articles/926266

mrssam answered 10 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

Thanks

Abu Ghufran answered 10 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

5 + 17 =

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?