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 creating a fast
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
also add LIMIT 15 to your query. no point in getting all that info if you
want 15 results.
On 7/18/06, Miguel Guirao <[EMAIL PROTECTED]> wrote:
Use the trim function, or anoter function that just takes the n first
characters.
-Original Message-
From: Benjamin Adams [mailto:[EMAIL PRO
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 MyS
> 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
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 result
>
> I have articles in a MySQL database a
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 a fast brows
> where p