Re: Re: SELECT query
| From: | Bastien Koert | Date: | Mon, 22 Dec 2008 02:03:53 +0000 |
| Subject: | Re: Re: SELECT query | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45825@lists.php.net to get a copy of this message | ||
On Sun, Dec 21, 2008 at 7:56 PM, Ron Piggott <ron.piggott@actsministries.org
> wrote:
>
> One more thing ... Bible is stored by verses, t is the text of the verse
>
> On Sun, 2008-12-21 at 19:52 -0500, Ron Piggott wrote:
> > I am working on a web based Bible searching query. So far I am able to
> > generate:
> >
> > SELECT * FROM
bible_verses INNER JOIN
> > bible_books ON
> > bible_books.id =
> > bible_verses.b WHERE
> > t IN ( 'Lord' ,
> > 'Jesus' ) LIMIT 0 , 10
> >
> > Is an "IN" the correct syntax to use?
> >
> > I am trying to take what the user types in (variable is $keyword_search)
> > and allow a search where if the same 2 or 3 words are in the verse of
> > the Bible that verse would be a match, but not necessarily be beside
> > each other.
> >
> > $keyword_search_string = str_replace(" ", "' , '",
> > $keyword_search);
> > $query .= "IN ( '" . $keyword_search_string . "' ) ";
> >
> > How do I do this correctly?
> >
> > Ron
> --
>
> Acts Ministries Christian Evangelism
> Where People Matter
> 12 Burton Street
> Belleville, Ontario, Canada
> K8P 1E6
>
> ron.piggott@actsministries.org
> www.actsministrieschristianevangelism.org
>
> In Belleville Phone: (613) 967-0032
> In North America Call Toll Free: (866) ACTS-MIN
> Fax: (613) 967-9963
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
query code looks correct. are you getting an error? have you tried echoing
out the sql and testing in phpmyadmin or some other gui tool?
--
Bastien
Cat, the other other white meat