Re: A Little Coldfusion help?
I a looking into something that can match my String value.
So many issues in one little post.
Lets start with the getNameInitials() function. It apparently returns a
simple string of the first letters of all the words of the string passed
into it. Using your example it is going to return 'BAG'.
I'm not sure why you need all of that. If you just want the first
letter of the sting, 'BLONDE AND GIRL' it would be simply be
left('BLONDE AND GIRL',1).
Secondly your LIKE statement is missing quotes and percents it should
read something as LIKE 'left(arguments.title,1)%' or however you want to
pattern match the database field.
Finally, if arguments.title is undefined or an empty string then you
will have a hanging where clause. Your SQL will be rendered as:
SELECT jokes.*, categories.*
INNER JOIN categories ON jokes.catID = categories.catID
And this will throw an error by any database I have ever used.