Heya,
Doing a php script, I need to just get it to display the first few hundred characters of text from a sql database (a preview). I've heard of the Left(tablename,200), but I can't seem to get it to work. I'll see if anybody has more luck than I do.
<?
$date = date("m.d.y");
require 'db.php';
$query = "SELECT News FROM `news` WHERE `Date` = '$date'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$news = " ".$row["News"]." ";
}
$news = nl2br($news);
echo "$news";
?>
This code works fine, just displays too much text. Thanks!