[PHP-DB] Re: Session troubles, could this be my isp's fault?

2003-02-25 Thread David Chamberlin
Are you also doing a session_start() at the beginning of your second page? It needs to be in every script trying to use session variables. -Dave David Rice wrote: I Have made two pages, "sess2.php" and "sess3.php" trying to create a session variable then access it in the other page. now when i

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

2003-02-21 Thread David Chamberlin
ryURL.'?entryId='.$id; mailOutLink( $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. Ho

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

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

2003-02-17 Thread David Chamberlin
anuals I have. I have about 50 users hitting our lone db, 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] wrot

[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

[PHP-DB] Re: php & date manupulation functions

2003-02-16 Thread David Chamberlin
David Elliott wrote: try "; echo date("m",$dbdate).""; echo date("y",$dbdate).""; ?> I thought date() took a timestamp, not a string. Here's what I do: $timestamp = $dbdate; echo date("d",$timestamp) echo date("m",$timestamp) -Dave -- PHP Database Mailing List (http://www.php.net/)

[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 2. get the number of rows from result 3. figure out paging scheme 4. SELECT FROM LIMIT , I forgot to include

[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 2. get the number of rows from result 3. figure out paging s

[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 degrades,

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

[PHP-DB] OR on multiple columns

2003-01-08 Thread David Chamberlin
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 their example: CREATE TEMPORARY TABLE tmp SELECT field1_index, field2_index FROM tes

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 *,TIME_FORMAT(time_column_1,'%whatever

[PHP-DB] mysql time format

2003-01-06 Thread David Chamberlin
Hey, This is a bit of a newbie question, but I couldn't find what I wanted in the documentation. Is there any way to set the time format so that any time values in my SELECT call are in a speicified format (e.g., HH:MM instead of HH:MM:SS). Basically I've got a table of a variety of different