RE: [PHP-DB] Difficult query ?

From: Date: Mon, 16 Oct 2000 12:56:29 +0000
Subject: RE: [PHP-DB] Difficult query ?
Groups: php.db 
Request: Send a blank email to php-db+get-3638@lists.php.net to get a copy of this message
I ran into a problem almost exactly like yours except with cat breeds. My solution was to implode all the information, insert it into a field called breed and do the query like this SELECT * from breeders HAVING breed LIKE '%$breed%'. The nice part about doing the implode is you are not limited to the number of fields you feel like putting in the table. You could serialize the data also but implode worked for me. I know the leading % is a performance hit but until MySQL will allow something like SELECT * from breeders WHERE breed% = '$breed' I don't see another option. [snip] Hi, I have 1 table with the rows Actor1,Actor2,Actor3 and title; What I want is 1 select box where you can type the actor and then get a list of the movies this actor is in... Anybody ideas ? [snip]

« previous php.db (#3638) next »