1
0
Fork 0
SVEN/webseite/sys/sources/envms-fluentpdo/tests/11-join-short-backref.phpt

25 lines
718 B
PHP

--TEST--
short join back reference
--FILE--
<?php
include_once dirname(__FILE__) . "/connect.inc.php";
/* @var Envms\FluentPDO\Query */
$query = $fluent->from('user')->innerJoin('article:');
echo $query->getQuery() . "\n";
$query = $fluent->from('user')->innerJoin('article: with_articles');
echo $query->getQuery() . "\n";
$query = $fluent->from('user')->innerJoin('article: AS with_articles');
echo $query->getQuery() . "\n";
?>
--EXPECTF--
SELECT user.*
FROM user
INNER JOIN article ON article.user_id = user.id
SELECT user.*
FROM user
INNER JOIN article AS with_articles ON with_articles.user_id = user.id
SELECT user.*
FROM user
INNER JOIN article AS with_articles ON with_articles.user_id = user.id