[snip]
WHERE ap_type='Original Movie Poster'
ORDER BY sort_title ASC
HAVING sort_title LIKE 'G%'
ORDER BY sort_title ASC

You may have to swap the HAVING and ORDER BY lines of the query,
[/snip]

Thanks so much. There was a slight syntax change, replacing your first ORDER
BY with a GROUP BY, but it worked.

SELECT posterdata.*,
       IF (aptitle LIKE 'The %',SUBSTRING(aptitle,5),
       IF (aptitle LIKE 'A %',SUBSTRING(aptitle,3),
       IF (aptitle LIKE 'An%',SUBSTRING(aptitle,4),aptitle))) AS sort_title
FROM posterdata
WHERE ap_type='Original Movie Poster'
GROUP BY sort_title ASC
HAVING sort_title LIKE 'g%'
ORDER BY sort_title ASC;

Many thanks.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to