Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 31 Oct 2010, 23:41
dfc005 dfc005 is offline
 
Join Date: Mar 2008
Using query_read to get birthday

I'm trying to use query_read to get a users birthday to display it to them in a custom page. But for some reason, it's always blank when it's returned.

I tried using birthday_search as well, it also comes back blank.

Any ideas?
__________________
Stick Sports
Reply With Quote
  #2  
Old 01 Nov 2010, 00:28
HyperActiv HyperActiv is offline
 
Join Date: Mar 2009
Location: Israel
Real name: Or Gozlan
Have you tried:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #3  
Old 01 Nov 2010, 00:36
dfc005 dfc005 is offline
 
Join Date: Mar 2008
Yup. Returns one row but that row has no value for birthday.....
__________________
Stick Sports
Reply With Quote
  #4  
Old 01 Nov 2010, 00:56
JamesC70 JamesC70 is offline
 
Join Date: Jun 2007
If you're already including the vBulletin framework in your custom page, then $userinfo[birthday] will contain the user's birthdate.
Reply With Quote
  #5  
Old 01 Nov 2010, 01:06
dfc005 dfc005 is offline
 
Join Date: Mar 2008
I assume as much but it's not returning anything either.

When I do a print_r on userinfo, I get the following....


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Both birthday and birthday_search are blank. Is this a vB setting some where?
__________________
Stick Sports
Reply With Quote
  #6  
Old 01 Nov 2010, 01:23
JamesC70 JamesC70 is offline
 
Join Date: Jun 2007
Are you testing with an account that's unalterable (per your config file)?

The only account in my database with no birthdate and a birthday_search of 0000-00-00 is my admin account, user #1.

If you look in your database through phpMyAdmin or similar, what's in the birthdate field for user #8?
Reply With Quote
  #7  
Old 01 Nov 2010, 01:31
dfc005 dfc005 is offline
 
Join Date: Mar 2008
It's an admin account and it's unalterable but it certainly has a birthdate and birthday_search as I've checked the table using phpMyAdmin.

--------------- Added 01 Nov 2010 at 01:46 ---------------

Tried accessing a different userid which isn't an admin and isn't locked and it has the same problem.

--------------- Added 01 Nov 2010 at 04:48 ---------------

OK, after further testing, it seems to only be a problem on my development server. No idea how to fix it though.
__________________
Stick Sports

Last edited by dfc005 : 01 Nov 2010 at 04:48. Reason: Auto-Merged DoublePost
Reply With Quote
  #8  
Old 01 Nov 2010, 12:24
HyperActiv HyperActiv is offline
 
Join Date: Mar 2009
Location: Israel
Real name: Or Gozlan
Originally Posted by dfc005 View Post
Yup. Returns one row but that row has no value for birthday.....
What do you mean row has no value for birthday?

In some of the cases you'll need to use PHP function
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to get logical date, and not the unix time.
Reply With Quote
  #9  
Old 01 Nov 2010, 21:03
dfc005 dfc005 is offline
 
Join Date: Mar 2008
The row was simply blank, no value. Not sure why it wasn't working on my development server but I reinstalled a fresh copy of vBulletin and it all seems to be fine now.
__________________
Stick Sports
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 07:03.

Layout Options | Width: Wide Color: