CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Adding DLookup Actions - Can't pass values.

Print topic Send  topic

Author Message
SteveG

Posts: 56
Posted: 12/19/2004, 4:30 AM

I'd really like to use the Add Actions feature to lookup a total to use in a link field - and avoid coding. Right now my where clause looks like this: 'Discussion_Id ='.ToSQL($discussionid,ccsInteger) ... basically trying to count up records which match the current discussion in the row - but I get many MySQL errors like "Fatal error: Call to undefined function: tosql() in ...". I've tried &'s, +'s, .'s, ''s, "'s, {',s, $'s, ToSQL's, and seeming every freatkin combination for the last, oh, four hours. Can someone please let me know the syntax for doing this routine function is?

Thanks,
View profile  Send private message
DonB
Posted: 12/19/2004, 5:34 AM

But what does the code in the Action routine look like?

For your requirement, can't you just use a query with GROUP BY to count the
records? That would mean no Action or any code is required at all.

Something along the lines of:

SELECT t1.*, COUNT(t2.*) FROM
table1 AS T1 LEFT JOIN table2 as t2
WHERE t1.foreignkey = t2.primarykey
GROUP BY t1.foreignkey

should incorporate the count of discussions, assuming there is a separate
table containing them ("table2"), which can even be a recursive relationship
to table1.
--
DonB

http://www.gotodon.com/ccbth


"SteveG" <SteveG@forum.codecharge> wrote in message
news:241c574654c3d0@news.codecharge.com...
> I'd really like to use the Add Actions feature to lookup a total to use in
a
> link field - and avoid coding. Right now my where clause looks like this:
> 'Discussion_Id ='.ToSQL($discussionid,ccsInteger) ... basically trying to
count
> up records which match the current discussion in the row - but I get many
MySQL
> errors like "Fatal error: Call to undefined function: tosql() in ...".
I've
> tried &'s, +'s, .'s, ''s, "'s, {',s, $'s, ToSQL's, and seeming every
freatkin
> combination for the last, oh, four hours. Can someone please let me know
the
> syntax for doing this routine function is?
>
> Thanks,
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.