I am trying to select the first 100 characters from one field in a table along with a couple of other fields. I'm also then trying to display the query result (LIMIT 1) randomly, so that each time someone pulls up the homepage they get a new "teaser" from our content database. I've seen this code in books and in this forum. I tried it and everything works except for the first 100 characters bit. It just doesn't appear. Here's my query:
SELECT LEFT(content, 100), id, headline FROM the_table ORDER BY rand() LIMIT 0,1", $db);
I've tried my 100 character request in all types of ways:
LEFT(content, 100)
LEFT(content,100)
LEFT('content', 100)
LEFT(content, '100')
LEFT('content', '100')
LEFT(100, content)
and on.... Nothing gets those 100 characters out of the d-base!
Any help is much appreciated!!!