如何在sqlite3 python中获取更多然后一个字母的查询?

时间:2018-11-20 02:25:41

标签: python tkinter sqlite

我正在制作一个程序,您可以在其中搜索sqlite3数据库中是否有内容。

render() {
    if(this.state.componentToLoad === 'component1'){
        return (<Component1/>);
    } else if(this.props.componentToLoad === 'component2'){
        return (<Component2/>);
}

该程序仅在我搜索1个字母的东西时有效。当我尝试其他操作时,它表示装订耗材的数量不正确。它还说当前语句使用1,而我提供了多少个字母。如果有人知道如何解决此问题,将不胜感激。

1 个答案:

答案 0 :(得分:3)

Cursor.execute()方法需要一个序列作为第二个参数。您提供的字符串恰巧是8个字符。

改为使用以下形式:

Array<T>