[CDBI] Question from newbie - CDBI search/search_like

[prev] [thread] [next] [Date index for 2005/11/30]

From: Vitaliy Babiy
Subject: [CDBI] Question from newbie - CDBI search/search_like
Date: 19:31 on 30 Nov 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





_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Question from newbie - CDBI search/search_like
Vitaliy Babiy 19:31 on 30 Nov 2005

Generated at 11:26 on 05 Dec 2005 by mariachi v0.52