Forums

help with an SQL command

jross 04 Jun, 2010
Hello, I've trawled the forums and found a post that describes an sql command that when used in CC, limits the display of records in the frontend only to records that hold a value in the jos_comprofiler table

eg WHERE cb_yardstorageground <> ""

What I need to do is show records in my frontend summary that shows records that have a value in EITHER or BOTH the tables cb_yardstorageground & cb_no1storage

I tried WHERE cb_yardstorageground OR cb_no1storage <> "" but this is not quite right. This only shows values from one field or the other. If a record holds a value in both these fields, I need both values to display.

Can anybody help with this little gremlin?

JR
GreyHead 05 Jun, 2010
Hi jross,

At present ChronoConnectivity can only list results from a single table, you can't use a JOIN statement.

You may though be able to create a MySQL VIEW or virtual table and use that in a CC query.

Bob
jross 07 Jun, 2010
Hi, thanks for that. Saves a lot of time trying to find a solution - I'll think about what Plan B might be. Where there is a will there is a way.

JR
GreyHead 07 Jun, 2010
Hi jross,

See Create View here I think that you could setup the View so that it existed before you configure the CC, then refresh it in the Header section? (NB Not tested and may not work.)

Bob
This topic is locked and no more replies can be posted.