I'm having a problem when I use mysql_fetch_array and extract() following a
left select query. As an example...

$query = "SELECT id,LEFT(fluff,80) FROM sometable";
$result = mysql_query($query) or die('message');

while ($row = mysql_fetch_array($result){
echo "<P>" . $id . ": " . $fluff . "</P>";

would echo the $id, but there would be nothing for $fluff. However, if I
select only 'fluff' from the MySQL table, I get the full text for $fluff. I
am reluctant to SELECT the entire fluff text from the table and shorten it
in PHP  as that seems inefficient to me - (but correct me if I am wrong).

I expect the solution must be dead easy, but I can't find it or figure it

Many thanks,


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to