for example: the table named products there is a product name field in the table. i want to show some related items which matched by the knowed products's product name.
how to write the sql query command?
eg: if the knowed products's product name is
True Blood Season 1 DVD
i want to get all the product name which begins as True Blood Season..
if the knowed products's product name is
24 Hours Season 7 DVD
i want to get all the product name which begins as 24 Hours Season..
the sql: what's error with the sql
$query ="select p.products_id, pd.products_name, p.products_price
from " . TABLE_PRODUCTS . " p " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = 1
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id <> :product_id AND MATCH('products_name') AGAINST (:products_name IN NATURAL LANGUAGE MODE);
CREATE TABLEstatements) and data, along with the desired result for the sample data, would be most helpful. What's your exact criteria for determining what's related?