Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
Simply wonderful news:> But again, for design work, it isn't worth the trouble. I'm using SESSION variables $_POST, $_SESSION, and as long as they don't change, there's little point upgrading until the site is on-line. However, I will inform my IP to use all the latest versions. I'm running L

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Evan Nemerson
Yeah. Apache is vulneralbe to a buffer overflow in the chunked-encoding, and PHP has (i think) a buffer overflow in the multipart/form-data POST form handling. It might be a format string though... that just came out this week. yesterday, i think. For dev you might want to consider using the C

RE: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread John Holmes
> further research indicates that for PG I could trysomething like: > > SELECT EXTRACT(MONTH FROM TIMESTAMP) I'm sure there is a NOW() or TIME() function in PG that returns the current date/time. Then you could do this: SELECT * FROM your_table WHERE EXTRACT(MONTH FROM your_column) = EXTRACT(MO

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
Hi John, further research indicates that for PG I could trysomething like: SELECT EXTRACT(MONTH FROM TIMESTAMP) Big John has offered some advice using: $today = getdate();  $start = $today['year'] . '-' . $today['mon'] . '-' . '01';  $end  =  $today['year'] . '-' . $today['mon'] . '-' . '31'

RE: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread John Holmes
Isn't there a MONTH function in PG? SELECT * FROM your_table WHERE MONTH(NOW()) = MONTH(your_column) ?? Or if PG stores dates in the Unix timestamp format, is the an equivalent to date() that you can extract the month from the column and compare them?? ---John Holmes... > -Original Message

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
Well, that would be nice! Sort of 'completes-my-day' :> So, both are vulnerable, eh? Great. Thanks for the warning -- but I'm using them for design only. Once the site is on-line, I'll be sure to use the upgraded versions. From what I read on-list, however, the current 'upgrades' have their pro

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Evan Nemerson
What do you guys think? Should we tell him he's running a vulnerable version of PHP _and_ of Apache??? On Tuesday 23 July 2002 16:26 pm, Andre Dubuc wrote: > Apache 1.3.23 + PHP 4.1.2 + PostgreSQl 7.2 > > I have a guestbook that I would like to display the current month's > entries. I can disp