about DAO

this is my code

$sql = $queryBuilder->select(‘p.id, p.en_title, t.price, p.specification, p.gaugebox, p.size’)->order($orderBy)->getText();

$sql2 = $queryBuilder->select(‘COUNT(*)’)->getText();

sql is same as sql2

but i hope get diff sql string.

Hope sql

sql = "SELECT p.id, p.en_title, t.price, p.specification, p.gaugebox, p.size FROM hp_product_online_rack_market_prices t LEFT JOIN hp_product_online_rack_markets m ON t.rack_id = m.id LEFT JOIN hp_products p ON m.product_id = p.id LEFT JOIN hp_product_bases b ON p.base_id = b.id WHERE (1 = 1) AND t.price BETWEEN 0 AND 100 ORDER BY m.created_at ASC "

sql2 = "SELECT COUNT(*) FROM hp_product_online_rack_market_prices t LEFT JOIN hp_product_online_rack_markets m ON t.rack_id = m.id LEFT JOIN hp_products p ON m.product_id = p.id LEFT JOIN hp_product_bases b ON p.base_id = b.id WHERE (1 = 1) AND t.price BETWEEN 0 AND 100"

What can i do?

There is no need to post same content both here and on GitHub - https://github.com/yiisoft/yii/issues/608