note 59503 added to function.substr
| From: | brad at BradTheissen dot com | Date: | Thu, 08 Dec 2005 18:45:35 +0000 |
| Subject: | note 59503 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99767@lists.php.net to get a copy of this message | ||
I not new to programming, but fairly new to PHP (personally, however I have given many others the
tools to learn and program PHP for me in companies).
I need to do this:
In one of my Tables I have a field called 'stars' which contains any number of names,
comma delimited (e.g. MarilynMonroe, LizTaylor, JamesDean, SantaClaus)
I need to build a $query = 'select ... where stars (contains) one of those names... one at
a time, by comparing to a variable $starname which has ONE star's name (e.g.
$starname=JamesDean).
So i want to do the $query = 'select x x x where stars (contains) $starname
so that I will find all records where jamesDean is one of the names in the stars field for that
record.
Would that be a good use of the STR command on this page, or a different variation of STRxxx ???
Thank you... a direct e-mail response would be awesome as well. THANK YOU!
----
Manual Page -- http://www.php.net/manual/en/function.substr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59503
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59503&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59503&report=yes
Search -- http://master.php.net/manage/user-notes.php