Re: [PHP-DB] Sigleton DB connection tripping on itself

2006-07-18 Thread Chris
Vandegrift, Ken wrote: Good Day List, I have a singleton DB connection that I am trying to use throughout my application but It keeps tripping on itself. My main question is: If I am in the middle of a transaction can I prepare multiple statements eand execute them or will this cause an err

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
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

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 MyS

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 result > > I have articles in a MySQL database a

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 a fast brows > where p

[PHP-DB] Sigleton DB connection tripping on itself

2006-07-18 Thread Vandegrift, Ken
Good Day List, I have a singleton DB connection that I am trying to use throughout my application but It keeps tripping on itself. My main question is: If I am in the middle of a transaction can I prepare multiple statements eand execute them or will this cause an error? Here is a code exampl

[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