PDA

View Full Version : mysql WHERE


FrEaKmAn
February 24th, 2007, 09:00 PM
Hi

is it possible that when I'm exporting data from mysql database, that I show only those lines which have word (product) located somewhere in the text??

Buzz
February 25th, 2007, 12:53 PM
Sure.. you can use LIKE in the where clause.


mysql_query("SELECT * FROM table_name WHERE fieldname LIKE value%");


There are other ways as well. You can use regex and other methods.

http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html