Answer the question
In order to leave comments, you need to log in
Why is the request not working through ActiveRecord?
The database has 2 tables:
$query = Request::find()
->select('customer.buy_type, request.id, request.customer_email)
->innerJoin('customer', '"request"."email" = "customer"."email"');
$query = (new \yii\db\Query())
->select('customer.buy_type, request.id, request.document_title,
request.customer_email, request.doctype_id, request.created')
->from('request')
->innerJoin('customer', '"request"."customer_email" = "customer"."email"');
Answer the question
In order to leave comments, you need to log in
I see the following errors in the first version:
1 missing quote after request.customer_email
2 instead of '"request"."email" probably should be '"request"."customer_email"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question