NO! This will return the first 20 characters from the field not the first 20
words. To do that you need to use a regexp in the SQL or explode the result
in php and use the first 20 elements of the array!

Regards


Jon Farmer
Systems Programmer
Entanet International Ltd www.enta.net
Tel 01952 428969
Mob 07968 524175

-----Original Message-----
From: Johannes Janson [mailto:[EMAIL PROTECTED]]
Sent: 13 August 2001 12:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Show abbreviated article


hi,

[...]
> My question is this: how can I select only those first 20 words in the
> PHP code?

SELECT LEFT(YourBlobFiekd, 20) FROM YourTable;

hope it helps
Johannes



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to