Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Install Issues  ›  Technical Question
Users Browsing Forum
No Members and 1 Guests

Technical Question  This thread currently has 181 views. Print
1 Pages 1 Recommend Thread
vol7ron
April 17, 2008, 3:41pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.45
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
I hope one of you can help me debug this.  I think it's the last of the Pg problems.  (Posts/Boards/Categories are all working now)

At the bottom of sub Register3() in Register.pl the program is updating the lastmember value to the $newuserid

This is giving an error because this value is NULL.
Usually I'm pretty good about debugging and finding where the problem is, but I can't find where $newuserid gets assigned.  The only other place I've even seen it is in a link destination a few lines above.

Divolging into this a little more while typing this, I know the problem is somewhere between Register3() and Validate().  Actually that might be the answer somewhere in GetMemberID and SaveMemberID

Any help is appreciated



Increase vol7ron's Rating
Logged Offline
Private Message Private message
vol7ron
April 17, 2008, 3:59pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.45
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
I was just joking... I still have the problem.  This is where I know it is:
     $sql->set('value');
     $sql->update($newuserid,'lastmember');

$newuserid is NULL.
Any help on where it gets populated is appreciated!!!!!



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 1 - 3
vol7ron
April 17, 2008, 5:01pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.45
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
Argh I'm back to the SaveMemberID dilemma from Load.pl



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 2 - 3
vol7ron
April 17, 2008, 5:26pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.45
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
OMG I finally found it.  As I assumed.

$newuserid = $savememberid->insert(@memvals);

So for anyone who really wants to know the issue was in the: the INSERT statement - which is the Pg.pm driver I modified from MySQL.pm

In it there used to "return($sth->{mysql_insertid});" which returns the id of the last record recorded.  This is one of the better qualities of MySQL, however PostgreSQL isn't as fortunate.

I had to custom make the query SELECT \"last_value\" FROM $schema\.$self->{_table}_id_seq;
Processed it would turn out to something like SELECT "last_value" FROM eblah.members_id_seq;

This worked perfectly in the past.  So what was the problem this time?
I'll tell you.  Every sequence set up in PostgreSQL had the structure <tbl name>_id_seq except one.  Guess which one didn't.  You got it, members_userid_seq was what it was called.  So the query couldn't find members_id_seq because it didn't exist.  Therefore no userid value was returned.

Solution, fix the table setup structure.



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 3 - 3
1 Pages 1 Recommend Thread
Print

E-Blah Community    Technical Support    Install Issues  ›  Technical Question