最も簡単な方法:
SELECT max(lngbookid) as lngbookid,
max(strtitle) as strtitle,
max(strauthor) as strauthor,
max(strcoursecode) as strcoursecode,
max(strisbn) as strisbn,
max(strcontactname) as strcontactname,
strcontactemail,
max(curprice) as curprice,
max(ysnsalerent) as ysnsalerent,
max(dtmpostdate) as dtmpostdate,
max(memcomments) as memcomments,
max(school) as school,
max(asin) as asin,
max(bookimg) as bookimg,
max(isbn10) as isbn10,
max(isbn13) as isbn13,
max(updated) as updated,
max(datetime) as datetime,
max(user_ip) as user_ip,
max(nootherbooks) as nootherbooks
FROM tblbooks
WHERE strcoursecode LIKE '%$search%'
GROUP BY strcontactemail
ORDER BY datetime DESC
LIMIT 50
編集
さて、上記は実際にはあまりにも「ダミー」でした。これを行うより良い方法は次のとおりです (列「lngbookid」が主キーである場合):
SELECT a.lngbookid,
a.strtitle,
a.strauthor,
a.strcoursecode,
a.strisbn,
a.strcontactname,
a.strcontactemail,
a.ontactemail,
a.curprice,
a.ysnsalerent,
a.dtmpostdate,
a.memcomments,
a.school,
a.asin,
a.bookimg,
a.isbn10,
a.isbn13,
a.updated,
a.datetime,
a.user_ip,
a.nootherbooks
FROM tblbooks AS a
JOIN (SELECT strcontactemail,
Max(lngbookid) AS lngbookid
FROM tblbooks
GROUP BY strcontactemail) AS b
ON ( a.strcontactemail = b.strcontactemail
AND a.lngbookid = b.lngbookid )