Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coldfusion mysql question

Status
Not open for further replies.

jdhilljr

Programmer
Sep 1, 2003
296
US
I am having either an interesting problem or a brain fart. Not sure which. Is there any reason this query would return different from the coldfusion server than from the actual mysql?

This is part of my query:

Code:
<cfquery name="get_team" datasource="bluesky">
SELECT * FROM locations LEFT JOIN teams ON teams.team_id=locations.location_team WHERE lower(location_name)='#LCASE(a[7])#, #LCASE(a[8])#'
</cfquery>
<cfdump var="#get_team#"><cfabort>

cfdump results with no information:
query
RESULTSET	
query
 	COMPANY_ID	LOCATION_CODE	LOCATION_GIFT	LOCATION_ID	LOCATION_NAME	LOCATION_TEAM	TEAM_ID	TEAM_NAME
CACHED	false
EXECUTIONTIME	1
SQL	SELECT * FROM locations LEFT JOIN teams ON teams.team_id=locations.location_team WHERE lower(location_name)='peru, il'

Returns this from mysql with the sql above:
location_id  location_name  location_gift  location_team  location_code  team_id  team_name  company_id   
85 Peru, IL 11 2 0 2 SJ1 2

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim
 
Figured it out. Even though it didn't show it was putting extra spaces in the where clause.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top