Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALTER TABLE shoc_product
- ADD FULLTEXT INDEX `art`
- (`model` ASC);
- SELECT p.product_id,p.model,
- MATCH (p.`model`) AGAINST ('Подшипник полуоси 52701-4A000')p1,
- MATCH (pd.`name`) AGAINST ('Подшипник полуоси 52701-4A000')p2,
- pd.`name`
- FROM shoc_product p LEFT JOIN shoc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN shoc_product_to_store p2s ON (p.product_id = p2s.product_id)
- WHERE
- MATCH (p.`model`) AGAINST ('Подшипник полуоси 52701-4A000')
- or
- MATCH (pd.`name`) AGAINST ('Подшипник полуоси 52701-4A000')
- order by p1 DESC,p2 DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement