Re: substring_index Part 2
| From: | Ron Brogden | Date: | Thu, 12 Apr 2001 18:03:03 +0000 |
| Subject: | Re: substring_index Part 2 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8527@lists.php.net to get a copy of this message | ||
At 11:53 AM 4/12/2001 -0500, you wrote:
Thanks for the help on the earlier ?. Now that I have the select statement working I can't get any results displayed.You can't print what you haven't asked for.
$result = mysql_query("SELECT substring_index(body, \".\" ,2) FROM news",$db) or die ("Invalid Query");There is no "headline" or "body" column asked for in the query above. You would have to add "headline" to the requested columns as well as adding an "AS something" clause for the substring_index call if you want the "substring" or the "body" column if you want that. Cheers, Ron -----------------------------------------------------------------------------
Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free: 1 800 331-3055 Victoria, B.C. Fax: 250 383-6698 V8W 2L1 E-Mail: support@islandnet.com Canada WWW: http://www.islandnet.com/-----------------------------------------------------------------------------