gpt4 book ai didi

cakephp 包含 - 条件

转载 作者:行者123 更新时间:2023-12-02 15:26:49 32 4
gpt4 key购买 nike

我的问题是我可以给出条件[ 'BookTitleMaster.id' => $xtitid, ] 如下所示

$bbookinfs = $this->BookStockin->BookIssue->find('all', array(
'conditions' => array('return_status' => 2),
'contain' => array(
'BookStockin' => array(
'BookTitleMaster' => array(
'BookTitleMaster.id' => $xtitid,
'fields' => array('id','title','sub_title','book_material_type_id','book_author_id','course_detail_id','isbn_no','book_publisher_id','pub_year','pub_place','desc','no_pages','volume'),
'BookMaterialType' => array('name'),
'CourseDetail' => array('name'),
'BookPublisher' => array('name'),
'BookAuthor' => array('name')
)
)
)
));

最佳答案

我相信你怀念的是:

'conditions' =>  array('BookTitleMaster.id' => $xtitid),

所以,你的最终代码应该是:

$bbookinfs = $this->BookStockin->BookIssue->find('all', array(
'conditions' => array('return_status' => 2),
'contain' => array(
'BookStockin' => array(
'BookTitleMaster' => array(
'conditions' => array('BookTitleMaster.id' => $xtitid),
'fields' => array('id','title','sub_title','book_material_type_id','book_author_id','course_detail_id','isbn_no','book_publisher_id','pub_year','pub_place','desc','no_pages','volume'),
'BookMaterialType' => array('name'),
'CourseDetail' => array('name'),
'BookPublisher' => array('name'),
'BookAuthor' => array('name')
)
)
)

));

HTH

关于cakephp 包含 - 条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3022385/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com