Closed stevepiercy closed 12 years ago
This appears to be an issue with Lassos Inline handling rather than with the knop call.
Knop_user -> login calls knop_database -> select. This in turn creates a regular inline and sends it off.
Testing to create a plain inline by itself shows the same flaw.
Example:
local(_search = array(-returnfield = 'id', -op='bw', 'email' = 'jolle', -search))
local(db_connect = array(-database = 'knop-demo', -table = 'customer'))
inline( #_search, -statementonly, #db_connect) => {^
action_statement
^}
SELECT SQL_CALC_FOUND_ROWS id
FROM knop-demo.customer WHERE email
LIKE 'jolle%' LIMIT 0,50
Should be:
SELECT SQL_CALC_FOUND_ROWS id
FROM knop-demo
.customer
WHERE email
LIKE 'jolle%' LIMIT 0,50
Can't figure out how to solve that within Knop. ->
Hm, interesting. The backticks disappear in the comments...
Backticks are markdown for ...
.
Anyway, I will send a bug report to LassoSoft. That's amazing that it's never been caught!
In Knop8, with a database named "foo-test", user->login will generate an SQL action statement:
SELECT SQL_CALC_FOUND_ROWS * FROM foo-test.users WHERE (
username
= 'username') LIMIT 0,50which in turn causes an SQL error.
The workaround is not to use hyphens in your database names.