Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はlaravelを使用しており、流暢/雄弁な(laravel)でこのクエリを実行する方法を理解しようとしています
select email, SUBSTRING_INDEX(email,'@',-1) AS domain from epost order by domain desc;
私の目標は、文字列の先頭からソートするのではなく、ドメイン namn でソートすることです。
return Email::order_by('email', 'desc');
助けてください。
この文字列を使用して動作するようになりました
return Epost::orderby(\DB::raw("SUBSTRING_INDEX(email,'@',-1)"), "desc")->get();