lines is an int and this is MySQL Database. No issues with it in access or sql server

also in  an order by clause in MySQl how many columns can be sorted at one time?

-----Original Message-----
From: Qasim Rasheed [mailto:[EMAIL PROTECTED]
Sent: Friday, November 05, 2004 2:49 PM
To: CF-Talk
Subject: Re: SQL help needed fast


which db, what is the datatype of lines?


On Fri, 5 Nov 2004 14:34:46 -0600, Eric Creese <[EMAIL PROTECTED]> wrote:
> Can some one please tell me why this does not work? If you pass the url.inch 
> variable it works fine. If you pass the url.line variable it fails with the 
> following error. code is below the error I need an answer quick please
> 
> Syntax error or access violation: You have an error in your SQL syntax near 'lines = 
> 1 ORDER BY Charht ' at line 8 The error occurred in 
> /home/auto1/autocomm-inc.com/html/dev/matrix.cfm: line 3
> 1 : <cfinclude template="header2.cfm">
> 2 :
> 3 : <cfquery name="getmatrix" datasource="yeuwes">
> 4 :     SELECT *
> 5 :     FROM p#url.prodid#_matrix
> 
> SELECT * FROM p1_matrix WHERE display=&apos;yes&apos; AND lines = 1 ORDER BY Charht ;
> 
> <cfquery name="getmatrix" datasource="autocomm">
>        SELECT *
>        FROM p#url.prodid#_matrix
>        WHERE display='yes'
>        <cfif url.prodid EQ 1>
>          <cfif isdefined('url.inch')>
>                <cfif url.inch EQ 1>
>                AND charht < 2
>                <cfelseif url.inch EQ 2>
>                AND charht < 3
>                AND charht >=2
>                <cfelseif url.inch EQ 3>
>                AND charht < 4
>                AND charht >=3
>                <cfelseif url.inch EQ 4>
>                AND charht < 7
>                AND charht >=4
>                <cfelseif url.inch EQ 7>
>                AND charht >=7
>                </cfif>
>          </cfif>
>          <cfif isdefined('url.line')>
>                <cfif url.line EQ 1>
>                AND lines = 1
>                <cfelseif url.line EQ 2>
>                AND lines =2
>                <cfelseif url.line EQ 3>
>                AND lines =3
>                <cfelseif url.line EQ 4>
>                AND lines >=4
>                </cfif>
>          </cfif>
>        ORDER BY Charht
>        <cfelseif url.prodid EQ 6>
>          <cfif isdefined('url.inch')>
>                <cfif url.inch EQ 5>
>                AND charht < 6
>                <cfelseif url.inch EQ 8>
>                AND charht < 9
>                AND charht >=6
>                <cfelseif url.inch EQ 18>
>                AND charht < 19
>                AND charht >=9
>                <cfelseif url.inch EQ 29>
>                AND charht < 30
>                AND charht >=19
>                <cfelseif url.inch EQ 30>
>                AND charht >=30
>                </cfif>
>        </cfif>
>        <cfif isdefined('url.line')>
>                <cfif url.line EQ 1>
>                AND lines = 1
>                <cfelseif url.line EQ 2>
>                AND lines =2
>                <cfelseif url.line EQ 3>
>                AND lines =3
>                <cfelseif url.line EQ 4>
>                AND lines >=4
>                </cfif>
>        </cfif>
>        ORDER BY charht
>        <cfelseif url.prodid EQ 19>
>        <cfif isdefined('url.type')>
>                <cfif url.type EQ 'baseball'>
>                AND event ='baseball'
>                <cfelseif url.type EQ 'basketball'>
>                AND (event = 'basketball'
>                OR event='Bsktbll/Wrstlng/Vollyball'
>                OR event='Possession Indicator'
>                OR event='Foul Panels'
>                OR event='Shot Clock')
>                <cfelseif url.type EQ 'football'>
>                AND event ='football'
>                <cfelseif url.type EQ 'hockey'>
>                AND event ='hockey'
>                <cfelseif url.type EQ 'BWV'>
>                AND event ='Bsktbll/Wrstlng/Vollyball'
>                <cfelseif url.type EQ 'race'>
>                AND event ='race track'
>                <cfelseif url.type EQ 'multi'>
>                AND event ='multi-sport'
>                <cfelseif url.type EQ 'soccer'>
>                AND event ='soccer'
>                </cfif>
>        </cfif>
>        ORDER BY event
>        </cfif>
>        ;
> </cfquery>
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183545
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to