1
0
Fork 0
SVEN/webseite/sys/sources/envms-fluentpdo/tests/17-join-in-where.phpt

20 lines
507 B
PHP

--TEST--
join in where
--FILE--
<?php
include_once dirname(__FILE__) . "/connect.inc.php";
/* @var Envms\FluentPDO\Query */
$query = $fluent->from('article')->where('comment:content <> "" AND user.country.id = ?', 1);
echo $query->getQuery() . "\n";
?>
--EXPECTF--
SELECT article.*
FROM article
LEFT JOIN comment ON comment.article_id = article.id
LEFT JOIN user ON user.id = article.user_id
LEFT JOIN country ON country.id = user.country_id
WHERE comment.content <> ""
AND country.id = ?