error code on <cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.co

<cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.company = 1433&g

Page 1 of 1

1 Replies - 2953 Views - Last Post: 24 December 2008 - 08:05 AM Rate Topic: -----

#1 mneris   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-December 08

error code on <cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.co

Post icon  Posted 24 December 2008 - 07:12 AM

Im getting an error when I type this code: Invalid CFML construct found on line 29 at column 51

<cfloop>
<cfquery name="getMgrBadge" datasource="iaMA">
Select mgrBadgeId,
managerName
FROM t_netportal_Manager
</cfquery>

<cfquery name="getSDEBadge" datasource="SDE">
SELECT *
FROM _smdba_._Customer_
WHERE client = "#getMgrBadge.badge#"
</cfquery>

<cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.company = 1433>
<cfquery name="updateSDE" datasource="SDE">
UPDATE _smdba_._Customer_
SET company = 1434
WHERE client='#getMgrBadge.mgrBadgeId#'
</cfquery>
<cfelse>
getSDEBadge.company = 1434
</cfif>
</cfloop>

Is This A Good Question/Topic? 0
  • +

Replies To: error code on <cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.co

#2 sansclue   User is offline

  • D.I.C Regular

Reputation: 29
  • View blog
  • Posts: 316
  • Joined: 21-November 07

Re: error code on <cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.co

Posted 24 December 2008 - 08:05 AM

View Postmneris, on 24 Dec, 2008 - 06:12 AM, said:

Im getting an error when I type this code: Invalid CFML construct found on line 29 at column 51

1. <cfif getSDEBadge.recordcount GT 0 AND getSDEBadge.company = 1433>
...
<cfelse>
2. getSDEBadge.company = 1434
</cfif>


There is no line 29 in the code you posted. But two things I noticed:

1. The "=" inside the <cfif> tag should be EQ if you are trying to test for equality

2. What is the line of code supposed to be doing? As is it probably just prints out the literal text.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1