我想做这个:
SELECT * FROM `mydb`.`table1`
INNER JOIN `mydb`.`table2`
ON `table2`.`table1_id` = `table1`.`id`
INNER JOIN `mydb`.`table3`
ON `table3`.`id` = `table1`.`table3_id`
WHERE `table2`.`myfield2`='string1'
AND `table3`.`myfield3` = 'string2';
在 Propel 上查询,但找不到正确的方法。只有两个表 join() 似乎像这样工作正常
$query = Table1Query::create()
->join('Table2')
->where('Table2.myfield2 = ?', $string1)
->filterByMyfield3($string2)
->findOne();
但它如何与三个或更多表一起工作?