Hi,

Thanks to all those that took the time to help me. As it turns out my problem had nothing to do with PHP; but the way I initialised a MySQL interger field.

Paul

----- Original Message ----- From: "csnyder" <[EMAIL PROTECTED]>
To: "NYPHP Talk" <talk@lists.nyphp.org>
Sent: Monday, March 03, 2008 6:59 PM
Subject: Re: [nyphp-talk] PHP/MySQL environment problem??


On Mon, Mar 3, 2008 at 1:13 PM, David Krings <[EMAIL PROTECTED]> wrote:
PaulCheung wrote:
I looked over the code and a few things struck me odd (which doesn't mean they
 are wrong!).

I didn't have that much patience. ;-)

I wonder why you're trying to count the rows in the database in order
to set up a simple auto-increment?
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

If for some reason your table can't include an AUTO INCREMENT field,
perhaps you could just "SELECT id FROM table ORDER BY id DESC LIMIT 1"
to get the highest id number, and then add one to it.


--
Chris Snyder
http://chxo.com/
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to