[PHP-DB] How to find the autoincremented number?

2003-02-21 Thread David Chamberlin
Hey, Most of the tables I use identify things using an id which is auto-generated using autoincrement. However I can't seem to figure out a good way to find what value was generated for the ID. For example, let's say I generate a new entry and want to e-mail out a link to it and the link

Re: [PHP-DB] How to find the autoincremented number?

2003-02-21 Thread David Chamberlin
( $linkAddress ); } Thank you! -Dave Leif K-Brooks wrote: http://www.php.net/manual/en/function.mysql-insert-id.php David Chamberlin wrote: Hey, Most of the tables I use identify things using an id which is auto-generated using autoincrement. However I can't seem to figure out a good way to find what

[PHP-DB] Re: Fwd: When to do free()?

2003-02-17 Thread David Chamberlin
, but no memory issues have occurred to date. Using Mac OS X Server 10.2.3 on Mac Server 533MHz 1GB of memory with MySQL 3.23.51. Hope this isn't wasted reading? :) On Sunday, February 16, 2003, at 07:39 PM, [EMAIL PROTECTED] wrote: Re: When to do free()? 25667 by: David Chamberlin From: David

[PHP-DB] Re: When to do free()?

2003-02-16 Thread David Chamberlin
to getAll() or getOne()) are INSERT/UPDATE/DELETE. Is there some reason you shouldn't do a free() after one of those? I'm still baffled. And still don't know if I should be using disconnect() at the end of each of my pages Any thoughts? Thanks, Dave David Chamberlin wrote: Hello, I'm

[PHP-DB] When to do free()?

2003-02-14 Thread David Chamberlin
Hello, I'm currently using pear DB to abstract out use of my mysql database. Everything is generally working fine, except that it seems that performance seems to degrade the more it is used, then I get my ISP to restart mysql and everything seems to be good again for a while, then it

[PHP-DB] efficient next/prev page generation

2003-02-14 Thread David Chamberlin
Hey, One more on efficiency. Basically all the examples I've seen for doing 'windowed dbase queries' (i.e., displaying a limited set of results and providing next/prev paging capabilities) have the same basic format: 1.SELECT * FROM table 2. get the number of rows from result 3. figure out

[PHP-DB] Re: efficient next/prev page generation

2003-02-14 Thread David Chamberlin
Just reviewed my post (should do that *before* hitting submit ... sigh ). One minor note, which should be obvious, but just for completeness: David Chamberlin wrote: 1.SELECT * FROM table 2. get the number of rows from result 3. figure out paging scheme 4. SELECT desired data FROM table LIMIT

Re: [PHP-DB] OR on multiple columns

2003-01-09 Thread David Chamberlin
Jason Wong wrote: On Thursday 09 January 2003 08:36, David Chamberlin wrote: I was reading the mysql docs and noticed a section on searching on multiple keys (stupid question - keys=columns?). It says doing an OR on multiple keys is inefficient, and you should use a temp table. Here's

Re: [PHP-DB] mysql time format

2003-01-07 Thread David Chamberlin
Paul Burney wrote: Why not add the TIME_FORMAT calls to the original query rather than performing all the extra queries? Is your first select something like the following? That's what I'd like to do, but not sure how to do that in this context. SELECT