call parallel INSERT when inserting

Questionscall parallel INSERT when inserting
Mario asked 8 years ago

Hello

Is there a way to insert a second insert by dooing someting like:
——————–
$col["editoptions"] = $insertquery
———————–

And in head is following code, it still works, but I need to refresh the site always that it is executed:

$mysqli = new mysqli
(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD, DB_DATABASE);
if(!$mysqli->insertquery("

INSERT INTO address_book (`name`)
select name from customers;

"))
{
echo $mysqli->error;
if($mysqli) $mysqli->close();
}

Or other idea, is it possible to refresh after insert?

Thanxs and best regards,
Mario

2 Answers
Abu Ghufran answered 8 years ago

Hello,

I don't completely understand your question.
If you want to insert in address book on each edit row, then recommended way is on_insert event.

If you want to refresh page after each insert, you can set:

$opt["onAfterSave"] = "location.reload();";
$g->set_options($opt);

selectcase.biz answered 8 years ago

Thank you this works. Yes. this calls the sql-statement after editing.

Your Answer

14 + 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 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?