thomas2340
Posts: 55
|
Posted: 03/01/2013, 3:30 AM |
|
hi,
i try to count a grouped SQL Query with custom code, but i get the following error:
CCS not counted.
my code in the before show event of the field called label1 is:
global $kontakte_bez;
$rc = $kontakte_bez->ds->RecordsCount;
$Component->SetValue($rc);
regards, thomas
|
|
|
lvalverdeb
Posts: 299
|
Posted: 03/01/2013, 1:14 PM |
|
http://forums.codecharge.com/posts.php?post_id=81316&s_...ccs+not+counted
_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4 |
|
|
thomas2340
Posts: 55
|
Posted: 03/01/2013, 1:37 PM |
|
i have already tried that, but it doesnt work for me
|
|
|
2advanced
Posts:
|
Posted: 03/04/2013, 5:44 PM |
|
Can you provide the table so that I may help you?
|
|
|
thomas2340
Posts: 55
|
Posted: 03/05/2013, 12:56 AM |
|
1.) this error i get when i change the mysql.xml file: supportSelectFromSelect="True"
Database Error: Operand should contain 1 column(s)
2.) this is my query
SELECT *
FROM (kontakte_bez LEFT JOIN objekte ON
kontakte_bez.objekt1 = objekte.objekt_id) LEFT JOIN kontakte ON
kontakte_bez.person1 = kontakte.kontakt_id
WHERE kontakte_beziehungen_id = {s_kontakte_beziehungen_id}
AND art = '{Expr0}'
AND firma1 = {s_firma1}
AND person1 = {s_person1}
AND projekt1 = {s_projekt1}
AND objekt1 = {s_objekt1}
AND einheit1 = {s_einheit1}
AND objekte.strasse LIKE '%{s_strasse}%'
AND objekte.ort = '{s_ort}'
AND objekte.stadtteil = '{s_stadtteil}'
GROUP BY firma1, name1
ORDER BY objekte.ort, objekte.strasse, objekte.hausnummer
regards, thomas
|
|
|
2advanced
Posts:
|
Posted: 03/05/2013, 12:13 PM |
|
here is my code to count I hope it helps
I have it on a label called bans
global $DBlocalhost;
$Page = CCGetParentPage($sender);
$ccs_result = CCDLookUp("COUNT(*)", "users", "ban_id=1", $Page->Connections["localhost"]);
$ccs_result = strval($ccs_result);
$Container->bans->SetValue($ccs_result);
|
|
|
laneoc
Posts: 154
|
Posted: 03/05/2013, 4:04 PM |
|
Just in case this can help:
http://forums.codecharge.com/posts.php?post_id=115683&s_keyword=count
_________________
Lane |
|
|
|