Tuesday, 6 August 2013

How to substract text from database without formatting

How to substract text from database without formatting

I want to substract 200 characters from mysql table, but the text is
formatting. So when I use:
$sql = "SELECT id, postdate, posttime, name, city, country, phone, email,
title, category, photo, status, password, SUBSTRING(description,1,200) as
description FROM forsale_content WHERE status='online' ORDER BY id DESC
LIMIT 15";
It will give me the description text, but if it's formatting as bold and
h1 tag, it will destroy the design.
What command should I use to substract those characters but without
formatting ?
Thank you.

No comments:

Post a Comment