[CDBI] Question from newbie - CDBI search/search_like

Vitaliy Babiy vitaliy.babiy at gmail.com
Wed Nov 30 19:31:24 GMT 2005


Hello Guys

I'm migrating my old code to CDBI and I'm having some difficulties
because it's my first experience with CDBI.

I have 2 SQL query which I need to move to CDBI.

1) SELECT a.id, a.name, al.id, al.name, al.cnt_tracks, al.status
   FROM artist AS a INNER JOIN album AS al ON a.id=al.artist
   WHERE al.name like '%$query%' ORDER BY a.name, al.name LIMIT 20
2) SELECT a.id, a.name, al.id, al.name, al.cnt_tracks, al.status
   FROM artist AS a INNER JOIN album AS al ON a.id=al.artist
   ORDER BY al.updated DESC LIMIT 50


I stuck here... Could somebody please point me the way to go? Should I
set up custom SQL using set_sql or it can be done via
search/search_like?

Your help is greatly appreciated.

Regards, Vit








More information about the ClassDBI mailing list