我想用laravel eloquent ORM执行以下原始查询:
cppFunction('
NumericVector fun() {
double data[5] = {1.0,2.0,1.0,2.0,1.0};
return as<NumericVector>(wrap(std::vector<double>(data,data+sizeof(data)/sizeof(*data))));
}
');
fun();
## [1] 1 2 1 2 1
SELECT *,(SELECT country FROM tbl_sim_numbers WHERE highland_id= b.highland_id) as country1,(SELECT operator FROM tbl_sim_numbers WHERE highland_id= b.highland_id) AS operator1 FROM tbl_sim_distributions b ORDER BY b.created_at
但是上面的代码给出了错误。有人,请帮忙。