这样DOC查询正确么?

小程序 文章 2022-01-05 09:20 9 0 全屏看文

这样DOC查询正确么?Is the DOC query correct?

这样DOC查询正确么?

上面报错内容.(文章可能有点长,麻烦进来的哥哥姐姐耐心看下)

刚开始可以正常运行,后来不知道怎么,我也没有怎么修改,程序一个页面突然跑不起来,就看见报错了,之前都可以跑起来的

刚开始不知道怎么回事,于是网上百度,说是数据库权限的问题,但是数据库权限是可以访问的

然后数据库里面也是有查询的字段,这里我查文章id查询,里面也是有的

这里我把传进来的参数对应文章id字段,但是好像报错了. 之前可以跑起来程序的时候代码都是这样的,后来跑不起来了.最后想问问 doc查询可以这样查询么

在线求解,本人做毕业设计.急急急

The error reported above (the article may be a little long. Please take a patient look at it.) at first, it can run normally. Later, I don't know how, and I didn't modify it. When a page of the program suddenly can't run, I see an error report. It can run before. At first, I don't know what's going on, so Baidu online said it's a problem of database permissions, However, the database permissions are accessible, and there are also query fields in the database. Here, I check the article ID query, and there are also some. Here, I correspond the passed parameters to the article ID field, but it seems that an error is reported Before the program can run, the code is like this, but later it can't run Finally, I want to ask if doc query can be queried like this. I do my graduation project Urgent

回答:

帅不过彭于晏:

为啥我之前好像可以这样跑起来,我改了后可以了,谢谢,之前想过使用where,想文章的id会不会冲突,出现可能会出现俩条数据.这样一想好像不会出现这种情况.十分感谢.

老张:

doc(_id)这里的doc只能填_id

可以改成where({Travel_id:id})

-EOF-