C
C
Caspergreen2018-06-06 08:10:07
Yii
Caspergreen, 2018-06-06 08:10:07

How to convert sql query to yii2 (ActiveRecord)?

There is a request

SELECT `tblRegistrars`.`iIndex` as `iRegistrarID`, 
                            `tblDomains`.`iIndex` as `iIndex`, 
                            `tblDomains`.`sName` as `sName`,
                            `tblRegistrars`.`sOrgR` as `sRegistrar`, 
                            `tblCustomers`.`sOrgRU` as `sOrg`, 
                            `tblCustomers`.`sNameRU` as `sNameRU`, 
                            `tblCustomers`.`eType` as `eType`, 
                            `tblDomains`.`dtRegistered` as `sRegistered`, 
                            `tblDomains`.`dtPassed` as `sPassed`, 
                            `tblRegistrars`.`rDeposit` as `rDeposit`, 
                            `tblRegistrars`.`rPrice` as `rPrice`, 
                            `tblRegistrars`.`eDepositCurrency`, 
                            `tblDomains`.`dtExpired` as `sExpired` 
                       FROM `tblDomains`, `tblCustomers`, `tblRegistrars` 
                      WHERE `tblDomains`.`iRegistrarID` = `tblRegistrars`.`iIndex` 
                        AND `tblDomains`.`iCustomerID` = `tblCustomers`.`iIndex` 
                        AND `tblDomains`.`dStatus` IN ("A_REG", "P_REG")
                   ORDER BY `tblRegistrars`.`iIndex`

How to convert it to yii2, activerecord?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2018-06-06
@vism

You need to read the documentation and redo it.
The word remake implies that you will have to do something!)
Otherwise, you can turn to a freelance site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question