Hello,
I have the following query where I combine two fields from two tables:
<cfquery name="SearchResult" datasource="MyDSN">
SELECT CONCAT(titles.TitleName, ', ', platforms.PlatformAbbreviation) AS Result
FROM
games
Inner Join platforms ON games.PlatformID = platforms.PlatformID
Inner Join titles ON titles.TitleID = games.TitleID
WHERE
UCase(titleName) LIKE Ucase('#ARGUMENTS.SearchString#%')
</cfquery>
<cfreturn ValueList(SearchResult.Result)>
I'm using this code to populate a search field through Ajax. The CONCAT function combines the title name and the platform abbreviation. Running SQL only confirms this. However, once the result comes back through Ajax, only the TitleName comes back. The rest of the string is missing.
For example: I'm expecting "Title Name, Platform" and I only get "Title Name" repeated for as many platforms as there are. What am I doing wrong?
FYI, my table structure is as follows:
platforms(platformID*, platformAbbreviation)
titles(titleID*, titleName)
games(gameID*,platformID*, titleID*)