Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- sPlantName,
- iPlantAge,
- PlantPrice,
- CONCAT (
- REPLACE (
- REPLACE (
- FORMAT (PlantPrice, 2), ',' ,' '
- ),'.',','
- ),'р.'
- ) as PlantPrice2,
- sPlantTypeName,
- if (
- LOCATE ('before', PlantHeight),
- CONCAT (
- 'до ',REPLACE (PlantHeight,' before','')
- ), if (
- LOCATE ('after', PlantHeight),
- CONCAT (
- REPLACE (PlantHeight,' after',''), ' и выше'
- ),
- PlantHeight
- )
- ) as PlantHeight,
- if (
- LOCATE ('before', PlantHeight) or LOCATE ('after', PlantHeight),
- (
- REPLACE (
- REPLACE (
- PlantHeight, ' after', ''
- ), ' before', ''
- ) - REPLACE (
- REPLACE (
- PlantHeight, ' after',''
- ), ' before', ''
- ) * 0.01
- ),
- PlantHeight
- ) as PlantHeight2
- FROM
- `plants`
- LEFT JOIN
- plantTypes
- ON
- idPlantType = eiPlantType
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement