close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Calculated fields in recordset?

Thread began 6/29/2012 5:41 am by gary.brett434358 | Last modified 7/05/2012 12:38 pm by gary.brett434358 | 4260 views | 15 replies


Your spot on Jason, I ran the 2nd query alone as a test and it also returned 0 rows, I tried change joins to match 1st query but still returns 0.. arrggg

$query_rsDetail = sprintf("SELECT tblreferral.RefferalID,   tblreferral.ReferralName,   Count(tblcases.CaseID) As Cases,   tblcasestatus.CaseStatusName 

FROM tblcases Inner Join tblcontacts On tblcontacts.ContactID = tblcases.ContactID Inner Join tblreferral On tblreferral.RefferalID = tblcontacts.ContactReferrelSource Inner Join tblcasestatus On tblcasestatus.CaseStatusID = tblcases.CaseStatusName

WHERE tblreferral.RefferalID=%s

GROUP BY tblreferral.RefferalID, tblcasestatus.CaseStatusName


SELECT 'tblreferral.RefferalID', 'GRAND-TOTAL', Count(tblcases.CaseID),''

FROM tblcontacts Inner Join tblcases On tblcontacts.ContactID = tblcases.ContactAssignedTo Inner Join tblreferral On tblreferral.RefferalID = tblcontacts.ContactReferrelSource WHERE tblreferral.RefferalID=%s", GetSQLValueString($ParamReferralID_rsDetail, "int"),GetSQLValueString($ParamReferralID2_rsDetail, "int"));
$rsDetail = mysql_query($query_rsDetail, $ghl_portal) or die(mysql_error());
$row_rsDetail = mysql_fetch_assoc($rsDetail);
$totalRows_rsDetail = mysql_num_rows($rsDetail);

$ParamReferralID_rsdetail2 = "-1";
if (isset($_GET['ReferralID'])) {
$ParamReferralID_rsdetail2 = (get_magic_quotes_gpc()) ? $_GET['ReferralID'] : addslashes($_GET['ReferralID']);

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...