Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
April 22, 2014, 11:19:15 PM

Pages: [1]   Go Down
  Print  
Author Topic: SQL ERROR [ postgres ]  (Read 4412 times)
marvelousartworks
Space Explorer
***
Offline Offline

Posts: 7


« on: December 14, 2012, 12:07:49 PM »

I got this solved.

But here is the question and the solution.

   
Code:
General Error
    SQL ERROR [ postgres ]

ERROR: null value in column "challenge_id" violates not-null constraint []

    SQL

    INSERT INTO phpbb_arcade_challenge (challenge_points, challenger_id, opponent_id, game_id, challenger_game_cost, opponent_game_cost, challenge_time) VALUES (0, 2, 55, 227, 0, 0, 1358351919)

    BACKTRACE

    FILE: (not given by php)
    LINE: (not given by php)
    CALL: arcade_msg_handler()

    FILE: [ROOT]/includes/db/dbal.php
    LINE: 757
    CALL: trigger_error()

    FILE: [ROOT]/includes/db/postgres.php
    LINE: 211
    CALL: dbal->sql_error()

    FILE: [ROOT]/arcade/includes/class_challenge.php
    LINE: 826
    CALL: dbal_postgres->sql_query()

    FILE: [ROOT]/arcade/includes/class_challenge.php
    LINE: 1278
    CALL: challenge->check()

    FILE: [ROOT]/arcade.php
    LINE: 134
    CALL: challenge->random()



SOLUTION:

I had to edit the challenge_id column edit defailt value (there was nothing in it). This is found  in the Control Panel at Lunarpages PhpPgAdmin
Code:
nextval('phpbb_arcade_challenge_seq'::regclass)

Sorry for the edit.
« Last Edit: December 21, 2012, 07:16:44 AM by marvelousartworks » Logged
Malin Cenusa
Customer Service Representative
Support
Spaceship Navigator
*****
Offline Offline

Posts: 84


The World Is Not Enough


WWW
« Reply #1 on: December 21, 2012, 03:02:10 AM »

Just a personal recommendation since you've edited the actual inquri would be to have it posted again and also the fix for it.
I'm glad that you managed to find a fix for it but I assume that some of our customers and also some of our forum visitors that are not customers would at some point in time experience the issue and most probably thank you for the fix as well.

 Thumbs Up
Logged

Malin Cenusa

Customer Service Representative 2 - Managed Shared Hosting Team
Lunarpages Internet Solutions

Managed Hosting Now Available
http://www.lpwebhosting.com/managed

Website: http://lunarpages.com
Email: support@lunarpages.com
Phone: 1-714-521-8150
Community - http://www.lunarforums.com
Tutorials - http://www.lunarpages.com/tutorials/
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5811



« Reply #2 on: December 21, 2012, 06:44:56 AM »

Yes, it's rude to ask a question and then replace it with a "NVM, I fixed it" without keeping the question and giving the details on how you fixed it. You're merely wasting people's time searching for and reading your post. It's even worse to remove the question after other people have spent the time to make one or more responses to your question -- you've wasted their time and effort too. I suppose that if you had posted sensitive or highly embarrassing information, that would warrant at least editing out that part, but please be considerate of others who will come after you and spend time accessing and reading your thread, and don't waste their time.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
marvelousartworks
Space Explorer
***
Offline Offline

Posts: 7


« Reply #3 on: December 21, 2012, 07:19:24 AM »

I am so sorry. I just wasn't thinking when I deleted the original message. I guess I was just so frustrated with all that I was doing trying to get it fixed that when I got it fixed I went delete happy and didn't think about someone else maybe having the same issue.

Please accept my apologies!

I have added the information and the solution back into the first post.

Angel
Logged
scanman20
Senior Moderator
▄ber Jedi
*****
Offline Offline

Posts: 1543



WWW
« Reply #4 on: December 21, 2012, 08:32:36 AM »

This topic would belong in a Postgres SQL forum if there was one. Or even a generic SQL forum.
Logged

Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5811



« Reply #5 on: December 21, 2012, 06:00:07 PM »

"challenge_id" sounds like something that would be autoincremented in MySQL, and thus not need an explicit value. I'm not familiar with PostgreSQL, but I would think it would have a similar facility. Perhaps the PHP code and the .sql to create the table were written for MySQL, and thus somewhat incompatible with other databases? That would be my guess. You probably don't want a fixed default value for that field, but something that has a unique value generated each time a row is inserted.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
marvelousartworks
Space Explorer
***
Offline Offline

Posts: 7


« Reply #6 on: December 21, 2012, 06:03:42 PM »

Well... the person that fixed it for me is the person that is working with the arcade MOD I have installed. And, the arcade is up and running perfectly.

Thank you for your comments.

Angel
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: