Permalink
Browse files

pass insert_id from OK packet to query() or execute() command object

  • Loading branch information...
1 parent 97de260 commit b0bdb3809bac45d630e7533e7217ed35e26b08fc @sidorares sidorares committed Aug 12, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 mysql/commands.js
View
@@ -231,6 +231,7 @@ function query(sql)
rs_ok: function( r )
{
var ok = r.readOKpacket();
+ this.insert_id = ok.insert_id;
if (ok.field_count == 0)
{
return 'done';
@@ -391,6 +392,7 @@ function execute(sql, parameters)
execute_ok: function(r)
{
var ok = r.readOKpacket();
+ this.insert_id = ok.insert_id;
if (this.ps.field_count == 0)
return 'done';
return 'fields';

0 comments on commit b0bdb38

Please sign in to comment.