sssschenyi 2022-05-30 11:17
浏览 33
已结题

sqlite查询字符串

img


请问查询en-US,得出查询结果id是 1 9 21 22这4行数据的语句怎么写?

  • 写回答

1条回答 默认 最新

  • sssschenyi 2022-06-03 20:31
    关注
    
    while True:
                query_2 = cur.execute('''
                select id,fatherID,dirandfile
                from filesystem where id='{}' '''.format(file_path_id))#   
                value2 = query_2.fetchone()
                file_path_id = value2[1]# 取数组的第1个数据
                li_value2 = value2[2]# 赋值数据
                bootdir = bootdir+','+li_value2 #连接字符串
                li_bootdir = bootdir.split(',') # 以 ,'为分隔符,分割bootdir 字符串
                if file_path_id =="C:":            
                    li_bootdir.reverse() #反转列表
                    print("li_bootdir",li_bootdir)
                    print(findStr,"文件在","C:\\"+"\\".join(li_bootdir))# 用 反斜杠 \ 连接字符串
                    print("query ok !!!")
                    break
    

    用PYTHON搞定了

    评论

报告相同问题?

问题事件

  • 系统已结题 6月7日
  • 创建了问题 5月30日