【发布时间】:2018-10-10 01:33:39
【问题描述】:
我在烧瓶中使用concat 函数运行MySql 查询,它总是返回1。
cur.execute("INSERT INTO jobs( job_id, job_name, company, who_created)
VALUES(%s,%s, %s,%s)",(job_id,job_name, company,
[cur.execute("select concat(first_name , ' ' , last_name)
from employees where username = %s", [username] ) ] ) )
who_created 总是返回 1。
当我在 MySQLWorkbench 上运行查询时,它工作正常并返回 first name + last name。
问题不在于 concat 函数,因为即使我在没有 concat 的情况下运行它,我也会收到“str object is not callable”错误
谢谢。
【问题讨论】:
标签: mysql flask mysql-python