Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to use mysql function in extbase querying?

What can i do if i want to something like following using extbase model query (Using Object Relational Model).

SELECT uid FROM table WHERE fIND_IN_SET('4',column_name);

OR something like

SELECT SUM(column_name) FROM table WHERE 1

Note : I don't want to use custom query using statement() method

like image 836
Mihir Bhatt Avatar asked Dec 03 '25 20:12

Mihir Bhatt


1 Answers

If you specified why you don't "want" to use a custom statement you would realize that you are mistaken. Your situation is the exact reason why statement() exists in the first place. Trying to avoid using it at almost any cost is unreasonable as the SQL abilities of extbase are far from covering all use cases. So in summary: use extbase API where logical and an obvious good choice but don't shy away from statement() where it's use is the obvious best choice just because usign extbase API "looks nicer" or it seems like with the API you're "using the framework to it's full potential".

like image 143
Vlatko Šurlan Avatar answered Dec 06 '25 09:12

Vlatko Šurlan