You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have a simple test table that looks like this:
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| id | int(11) | YES | | <null> | |
| pname | varchar(255) | YES | | <null> | |
+-------+--------------+------+-----+---------+-------+
I connect to the database successfully and then try to insert some values using named arguments such as this,
stmt = DBInterface.prepare(conn,"insert into test values(:id, :pname) ;")
This results in the error:
julia> stmt = DBInterface.prepare(conn,"insert into test values(:id, :pname) ;")
ERROR: (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':id, :pname)' at line 1
Stacktrace:
[1] prepare
@ ~/.julia/packages/MySQL/tCDUl/src/api/papi.jl:4 [inlined]
[2] prepare(conn::MySQL.Connection, sql::String; mysql_date_and_time::Bool)
@ MySQL ~/.julia/packages/MySQL/tCDUl/src/prepare.jl:48
[3] prepare(conn::MySQL.Connection, sql::String)
@ MySQL ~/.julia/packages/MySQL/tCDUl/src/prepare.jl:45
[4] top-level scope
@ /data/projects/Stocks/testsql.jl:17
If I use positional arguments it works fine. However positional arguments can't handle more complicated queries wherein a given argument must appear multiple times within the query.
Is this an issue within DBInterface or MySQL?
The text was updated successfully, but these errors were encountered:
So I have a simple test table that looks like this:
I connect to the database successfully and then try to insert some values using named arguments such as this,
This results in the error:
If I use positional arguments it works fine. However positional arguments can't handle more complicated queries wherein a given argument must appear multiple times within the query.
Is this an issue within DBInterface or MySQL?
The text was updated successfully, but these errors were encountered: