in reply to Re: INSERT with RETURNING INTO clause
in thread INSERT with RETURNING INTO clause
Thank you for your reply. It was much more useful than the flaming going on in the chatterbox. The solution is as follows:
1. Change the sql, so that there are 3 placeholders in the values clause:
my $sql = qq { INSERT INTO peck_test VALUES ( ?,?,? ) RETURNING my_id INTO ? };
2. Change the binding as follows:
Thanks again, Akoya$sth->bind_param (1, $id, SQL_NUMERIC); $sth->bind_param (2, $name, SQL_VARCHAR); $sth->bind_param (3, $desc, SQL_VARCHAR); $sth->bind_param_inout(4, \$id, SQL_NUMERIC);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: INSERT with RETURNING INTO clause
by GotToBTru (Prior) on Feb 24, 2014 at 16:34 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |