Re: MySQL with php

From: Date: Sun, 22 Sep 2002 19:41:36 +0000
Subject: Re: MySQL with php
References: 1  Groups: php.lang 
Request: Send a blank email to php-lang+get-389@lists.php.net to get a copy of this message
"Jan" <supergrovers@hotmail.com> wrote in message news:20020922165309.88998.qmail@pb1.pair.com... | Hello | i've a simple question i think ;) | if i want to do a query with 2 keywords in a MySQL database, how do i write | it in my script? | | ie. I want to search for name=peter pan with the keywords "pan" and | "peter" | | I thought it's like this: | $query=SELECT ... FROM ... WHERE name LIKE '%pan%' AND LIKE '%peter%' | $query=SELECT ... FROM ... WHERE name LIKE '%pan%' AND name LIKE '%peter%' | but this isn't working :( | | hope somebody can help me out. | | thanks, | | | Jan | Cheers, Dejan

« previous php.lang (#389) next »