Forum Moderators: coopster
Basically I have some records that have BIG product descriptions which when displayed obviously spams up my site. I just wondered, is there any way I can cap this to only return say 256 characters like...
"bla bla bla this is a description of this product... more info"
Then add the dots at the end and a more info link.
Can this be done?
Sorry to make no sense and be very vague I am in a rush as I type this :-)
Cheers
$query = "SELECT SUBSTRING(description,1,256) FROM table";
Something like that ;)
Good luck!
Is there a way I can work it into an existing SELECT * statement?
My current code is as follows..
<---
SELECT * FROM awin WHERE MATCH(masterCategory, name, brand, description) AGAINST('+(aquascutum) +(mens men\'s mans man\'s) +( belt beanie baseball scarf bag glasses socks \"flip flops\" \"silk tie\" sandals shorts) -(jeans shirt)' IN BOOLEAN MODE) ORDER BY name
--->
description being the field I want to apply this to.
Cheers
Ben
[edited by: zink at 1:49 pm (utc) on Aug. 29, 2006]
Zend has you answer in a good tutorial (second part)
HERE [zend.com]
Next we are speaking about DB optimization creating an index etc...
But I rather have another fellow WM developing that topic.
Or you could post separately a new topic either here or in database
Hope it woks