save
Aug 21st 2007, 10:55 pm
How would I be able to only show say 300 characters from the description field when I retrieve records from MySQL?
$query = "SELECT id, name, price, image_url, description FROM `products` ORDER BY rand() LIMIT 4;";
database_inquiry($query, $rows);
$products = $rows;
<?=$item['description']; ?>
$query = "SELECT id, name, price, image_url, description FROM `products` ORDER BY rand() LIMIT 4;";
database_inquiry($query, $rows);
$products = $rows;
<?=$item['description']; ?>