[PHP] Just cant figure out how this could be happening...

2002-10-03 Thread Owen Parker

hi all

have a really simple query:

$twowksworth = mysql_query(SELECT updates.MODELCODE, updates.SETNO,
updates.FRPICNO, updates.TOPICNO, updates.CPOSTDATE, updates.ZIPFILENAME,
updates.TOTPICS, models.MODELNAME FROM updates LEFT JOIN models ON
updates.MODELCODE = models.MODELCODE WHERE updates.CPOSTDATE = (
CURDATE() - 14 )AND updates.CPOSTDATE = CURDATE() ORDER BY
updates.CPOSTDATE  ) ;

When this was originally written it worked like a charm.  I purposefully
let it 'run out' of data by not adding any more to the table.  each day for
two weeks the list resulting from this query got shorter as expected.  The
day after there was no data, it started listing the entire contents of the
table.  What the...

So i added a few weeks worth of data and now it correctly cuts off at
today's dat but it completely ignores the curdate() - 14 portion and lists
the entire table up to today's date.

this is so basic i cant figure it out.  besides, it used to work.  what
gives?  I'm really new to php and mysql, but until now felt i had made good
progress in the past couple
weeks.  just cant figure out how to troubleshoot this error due to lack of
experience and knowledge.

is there something really basic i am missing here?  any pointers would be
greatly appreciated!!

tia

owen






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Two PHP questions

2002-10-03 Thread Owen Parker

Hi

firstly, magic quotes have something to do with how your php server
interprets the embedded php commands, or at least that's what I took it too
be.  I dont really know the details but it is definitely a setting in your
php.ini.  Maybe you can research it to your needed detail from that.

Secondly, if your page is of variable length, there must be someway to
calculate the number of rows according to the variable part.  I'd count the
number of set lines (ie: the titles, forced spaceing, etc) and add to it the
variable number of rows or whatever you are displaying in real time.  a
simple if statement somewhere in the display routine should take care of
inserting a top of page link.

HTH

l8r
owen

Liam Gibbs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 First of all, what exactly is get/set_magic_quotes_runtime? (I know what a
 get/set function does, and I know what magic_quotes does, but I'm unclear
 about what magic_quotes_runtime is as opposed to _gpc). Does it get the
 magic_quotes setting at runtime, before anything has been
 set_magic_quotes_runtime'd? I sort of get that it has to do with returning
 slashes with quotes in a function as opposed to doing it when a function
is
 called. Any clarifications? The only comment on the PHP list says that
it's
 being turned off, so I guess it's not that important.

 Secondly, is there any way of counting how long in pixels my page runs?
 Basically, my situation is this: I want to know if my page runs more than
a
 screen and a half (or so... still deciding) of the user's screen so that I
 can put a Go to Top link on the bottom if it's useful. Any ideas?

 Thanks in advance!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php