Are the queries the exact same every time you refresh them? This seems just
to be programming logic (I guess). Post some code and maybe someone (or I)
will be able to help you out.

"Gavin Jackson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for your input Bobby
>
> I was using mysql_fetch_array() but changed to mysql_fetch_assoc()
> The funny thing is, I have a page that does the var_dump() and all
> I'm doing is refreshing the page and sometimes I get 18 other times
> 16 variables
>
>
> Gavin
> Auckland, New Zealand
>
> > -----Original Message-----
> > From: Bobby Patel [SMTP:[EMAIL PROTECTED]
> > Sent: Friday, March 21, 2003 11:29 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Re: Missing session vars when doing var_dump()
> >
> > I would think that they are 16 key/value pairs when the MySQL (TEXT)
> > fields
> > are null thus the session variables are NOT set thus NOT present.
> >
> > Hypothsis: I believe that your are using
> > mysql_fetch_array($query_resource),
> > try using the second parameter as well ie.
> > mysql_fetch_array($query_resource, TYPE_OF_ASSOCIATION) example
> > mysql_fetch_array($query_resource, MYSQL_ASSOC) (please see php.net for
> > details of "mysql_fetch_array").
> >
> > By using the second parameter, even NULL values will has a variable set.
> >
> > Example say you had a field called FirstName in the MySQL database. If
it
> > was NULL, then without the additional parameter you would have NO key
> > named
> > 'FirstName' exisiting (ie it is not set). But if you used the second
> > parameter a key would be created with no value (ie it is set but empty).
> >
> > So remember, the second parameter is OPTIONAL, but it has different
> > behaviors when you do (and do not) use it. Hopefully I cleared it up (or
> > at
> > least shed  some light).
> >
> > checkout : http://www.php.net/manual/en/function.mysql-fetch-array.php
> >
> >
> > "Gavin Jackson" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi
> > >
> > > I have come across a strange problem. I have an application that a
user
> > > logs into and when I find the user in the database I load all the
custom
> > > info for that use which I store. By the time I'm done, the session
array
> > > has 18 key's. When I do a var_dump($_SESSION) I sometimes get
> > > 18 variables and sometimes I only get 16. The two fields that are
> > missing
> > > are TEXT fields from a MySQL database and they also appear to be
> > > the last two keys when var_dump() returns all 18 keys.
> > >
> > > Does anyone know what is causing this, it's driving me crazy at the
> > > moment with many late nights. The PHP version running is 4.2.3
> > >
> > > Regards
> > >
> > > Gavin
> > >
> > > Auckland, New Zealand
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php



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

Reply via email to