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 display all the entries before the current month, but i > can't seem to figure out how to extract the currrent month's. > > Although the code below is a db issue, I don't know whether I should write > code to extract the info before or after the db connection. Should I: > > 1. Set up the parameters beforehand in PHP, and then do a query; > 2. Within the query itself (as the code I tried [and didn't work] below); > 3. Or, somehow in PHP, after I get all the results [obviously without the > db WHERE clause]. > > <?php > // lots of code > > $db = pg_connect("dbname=rap user=postgres"); > $query = "SELECT * FROM guest WHERE pdate = "{$_SESSION['pdate'] == > date('Y-m')"; // pdate is formatted ('Y-m-d') > > // etc, etc. . . > ?> > > I know this is a simple question -- but my mind's totally blotto after a > day's coding. > > Any help, pointers of where to look, or admonitions will be gratefully > accepted. > > Tia, > Andre -- If you pick up a starving dog and make him prosperous, he will not bite you; that is the principal difference between a dog and a man. Samuel Clemens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php