RE: [PHP-DB] Only a section from the database result

2006-07-21 Thread Bastien Koert
http://ca3.php.net/manual/en/function.substr.php is the function you want bastien From: Benjamin Adams <[EMAIL PROTECTED]> To: PHP DB Subject: [PHP-DB] Only a section from the database result Date: Tue, 18 Jul 2006 13:24:51 -0400 I have articles in a MySQL database and I want crea

Re: [PHP-DB] Only a section from the database result

2006-07-18 Thread Benjamin Adams
I have it working with left, Thanks everyone. On Jul 18, 2006, at 1:57 PM, [EMAIL PROTECTED] wrote: I have articles in a MySQL database and I want creating a fast brows where people can read the beginning of the articles and select the ones they want to read. How do I only display the first

Re: [PHP-DB] Only a section from the database result

2006-07-18 Thread Darryl Steyn
[EMAIL PROTECTED] Sent: Martes, 18 de Julio de 2006 12:25 p.m. To: PHP DB Subject: [PHP-DB] Only a section from the database result I have articles in a MySQL database and I want creating a fast brows where people can read read the beginning of the articles and select the ones they want to read. Ho

RE: [PHP-DB] Only a section from the database result

2006-07-18 Thread Miguel Guirao
Use the trim function, or anoter function that just takes the n first characters. -Original Message- From: Benjamin Adams [mailto:[EMAIL PROTECTED] Sent: Martes, 18 de Julio de 2006 12:25 p.m. To: PHP DB Subject: [PHP-DB] Only a section from the database result I have articles in a

Re: [PHP-DB] Only a section from the database result

2006-07-18 Thread dpgirago
> I have articles in a MySQL database and I want creating a fast brows > where people can read the beginning of the articles and select > the ones they want to read. > > How do I only display the first say 50 chars of a 5000 char article? > > $count = 1; > while(($row = mysql_fetch_array($News)) o

RE: [PHP-DB] Only a section from the database result

2006-07-18 Thread Dwight Altman
echo "" . substr($row['pagetext'], 0, 50) . ""; Regards, Dwight > -Original Message- > From: Benjamin Adams [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 18, 2006 12:25 PM > To: PHP DB > Subject: [PHP-DB] Only a section from the database re

RE: [PHP-DB] Only a section from the database result

2006-07-18 Thread Dwight Altman
substr Regards, Dwight > -Original Message- > From: Benjamin Adams [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 18, 2006 12:25 PM > To: PHP DB > Subject: [PHP-DB] Only a section from the database result > > I have articles in a MySQL database and I want creating

[PHP-DB] Only a section from the database result

2006-07-18 Thread Benjamin Adams
I have articles in a MySQL database and I want creating a fast brows where people can read read the beginning of the articles and select the ones they want to read. How do I only display the first say 50 chars of a 5000 char article? $count = 1; while(($row = mysql_fetch_array($News)) or ($c