Question : PHP + MYQL - Lile statement problem

Hi,

I need to query my mysql with like statement.

My database valeu is /home/florlpt1/public_html/safelinet_t/system/data/default_home_folder/teste/FGCI 2010/Norte/


this is my query
SELECT * FROM `df_modules_shares` WHERE `path` LIKE '%/home/florlpt1/public_html/safelinet_t/system/data/default_home_folder/teste/FGCI 2010/Norte/123'

so I need that the query return me the database valeu "/home/florlpt1/public_html/safelinet_t/system/data/default_home_folder/teste/FGCI 2010/Norte/"

How can I do it?

Thanks

André Bolinhas

Answer : PHP + MYQL - Lile statement problem

Ok, maybe try reversing the LIKE:

SELECT * FROM `df_modules_shares` WHERE '/home/florlpt1/public_html/safelinet_t/system/data/default_home_folder/teste/FGCI 2010/Norte/123' LIKE CONCAT(path, '%')
Random Solutions  
 
programming4us programming4us