[PHP-DB] select substring_index

2001-04-11 Thread Mike Baerwolf
I have a simple news manager and I would like to display the first two sentences of a news story. I got this select statement from the mysql mailing list: SELECT substring_index( body, ". ", 2) FROM news; This works great from the mysql client but when I try it using php with this: $result

Re: [PHP-DB] select substring_index

2001-04-11 Thread Paul Burney
on 4/11/01 7:48 PM, Mike Baerwolf at [EMAIL PROTECTED] wrote: SELECT substring_index( body, ". ", 2) FROM news; This works great from the mysql client but when I try it using php with this: $result = mysql_query("SELECT substring_index(body, "." ,2) FROM news" The way you have this