我有Doctrine的实体:
<?php
/**
* @Entity
* @Table(name="orders")
*/
class Orders {
/** @Id @Column(name="OID",type="integer") @GeneratedValue */
private $id;
/** @Column(name="Product",type="string")*/
private $product;
/** @Column(name="RegCode",type="string")*/
private $reg_code;
/** @Column(name="OrderEmail",type="string")*/
private $email;
}
Run Code Online (Sandbox Code Playgroud)
我需要像这样进行查询:
select * from `orders` where `OrderEmail`='some@mail.com' and `Product` LIKE 'My Products%'
Run Code Online (Sandbox Code Playgroud)
我尝试处理查询没有像:
$em->getRepository("Orders")->findByEmailAndProduct($uname,$product);
Run Code Online (Sandbox Code Playgroud)
但它会犯错误.为什么?没有DQL我可以执行此查询吗?我想让这个查询使用魔术方法findBy**
在AngularJS中发送请求我使用builtin $ http服务.
我将使用什么来向Angular中的服务器发送请求?我找不到任何涉及该主题的文档.