TableUpdate Function
Posted by: Christian Soutou
Date: September 10, 2016 09:11AM

Hi
How use bind for a update function ?

// command line

CREATE TABLE bd_json.tab_vol_json2
(id_vol INTEGER AUTO_INCREMENT PRIMARY KEY,
doc JSON,
modif DATETIME
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

// shell

db.tab_vol_json2.insert( "doc","modif" ).
values(
'{"num_vol":"AF6148","date_vol":"2016-09-09","desc_vol":null,"sieges":null}',
'2016-09-09 20:00:00')

mysql-js> db.tab_vol_json2.update().
... set("modif" ,":dvol").
... where("id_vol=1").
... bind("dvol", "2016-09-09 19:35:00")
...
LogicError: TableUpdate.bind: Unable to bind value for unexisting placeholder: dvol at (shell):4:9
in bind("dvol", "2016-09-09 19:35:00")

Options: ReplyQuote


Subject
Views
Written By
Posted
TableUpdate Function
1008
September 10, 2016 09:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.