本文整理汇总了PHP中Call::create_export_query方法的典型用法代码示例。如果您正苦于以下问题:PHP Call::create_export_query方法的具体用法?PHP Call::create_export_query怎么用?PHP Call::create_export_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call::create_export_query方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testcreate_export_query
public function testcreate_export_query()
{
$call = new Call();
//test with empty string params
$expected = 'SELECT calls.*, users.user_name as assigned_user_name FROM calls LEFT JOIN users ON calls.assigned_user_id=users.id where calls.deleted=0 ORDER BY calls.name';
$actual = $call->create_export_query('', '');
$this->assertSame($expected, $actual);
//var_dump($actual);
//test with empty string params
$expected = 'SELECT calls.*, users.user_name as assigned_user_name FROM calls LEFT JOIN users ON calls.assigned_user_id=users.id where users.user_name="" AND calls.deleted=0 ORDER BY calls.name';
$actual = $call->create_export_query('name', 'users.user_name=""');
$this->assertSame($expected, $actual);
//var_dump($actual);
}