Re: [PHP-ES] una duda!!!!

[email protected] (Félix Horro Pita)
Newsgroups php.general.es
Message-ID <[email protected]>
On 15/09/11 12:24, Irantzu Leunda Biskarret wrote:
> el campo recursos puede contener cosas de este tipo:
> 
> 18;36
> 18
> 1,18,36
> 1;18
> 
> El caso es que necesito que me muestre todos los registros donde
> aparece el 18 (por ejemplo)


Suponiendo MySQL, algo como:

SELECT * FROM tabla WHERE recursos REGEXP '[[:<:]]18[[:>:]]';


Tienes la referencia en:

http://dev.mysql.com/doc/refman/5.0/en/regexp.html


Un saludo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.