Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 27 November 2016 at 16:32:26 UTC, Suliman wrote: Looks like you forgot a call to format before the opening parenthesis. should be: string sqlinsert = format(`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s', '%s') `, login, uploading

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 27 November 2016 at 16:42:17 UTC, Suliman wrote: Am I right understand that `scope(exit)` should be always at top, otherwise it would not work (it's very strange because by the docs it's calling every time when function out of the scopes)? No, scope(exit) queues the thing for execu

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
As an aside, for security reasons you should use a prepared statement. Even if it's server-side code and there is no any iteration with user data (they come as JSON) Also, this is a decent usecase for scope(exit) but it should be put earlier in the function. Am I right understand that `scope

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
Looks like you forgot a call to format before the opening parenthesis. should be: string sqlinsert = format(`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s', '%s') `, login, uploading_date, geometry_type, data); because what ends up happening

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Erik van Velzen via Digitalmars-d-learn
On Sunday, 27 November 2016 at 12:13:03 UTC, Nicholas Wilson wrote: On Sunday, 27 November 2016 at 11:49:25 UTC, Suliman wrote: On Sunday, 27 November 2016 at 11:21:58 UTC, drug007 wrote: void dbInsert(string login, string uploading_date, string geometry_type, string data) {

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 27 November 2016 at 11:49:25 UTC, Suliman wrote: On Sunday, 27 November 2016 at 11:21:58 UTC, drug007 wrote: On 27.11.2016 14:07, Suliman wrote: I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`I

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
On Sunday, 27 November 2016 at 11:21:58 UTC, drug007 wrote: On 27.11.2016 14:07, Suliman wrote: I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`INSERT INTO usersshapes (userlogin, uploading_date, geo

Re: Using the result of a comma expression is deprecated

2016-11-27 Thread drug007 via Digitalmars-d-learn
On 27.11.2016 14:07, Suliman wrote: I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '

Using the result of a comma expression is deprecated

2016-11-27 Thread Suliman via Digitalmars-d-learn
I am getting deprecation message: "Using the result of a comma expression is deprecated" on this code: string sqlinsert = (`INSERT INTO usersshapes (userlogin, uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s', '%s') `, login, up