forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Sat May 26, 2018 11:43 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SQL Error Gamemaster.php
PostPosted: Sat Apr 04, 2009 4:39 pm 
Offline

Joined: Thu Apr 02, 2009 4:13 pm
Posts: 93
I was testing the changesin diplaymap and until now it worked fine.
for a faster test I startet manual teh gamemaster.php with the nescessary informations and I can see 2 things:

phpDiplomacy ran into a problem is always on the topright of the gamemaster.php, but there is no error log for that

sometimes I receive errors when clicking the refresh button

Error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id IN (9)' at line 3"
Raised: "D:\www\www688\diplomacy\objects\database.php"
Line: "323"
Variable dump: sql => UPDATE pD_Users
SET timeLastSessionEnded = 1238857141, lastMessageIDViewed =
WHERE id IN (9)


Trace:
0 => Array: (
function => error_handler
args => Array: (
0 => 1024
1 => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id IN (9)' at line 3
2 => D:\www\www688\diplomacy\objects\database.php
3 => 323
4 => Array: (
sql => UPDATE pD_Users
SET timeLastSessionEnded = 1238857141, lastMessageIDViewed =
WHERE id IN (9)

I tested the sql command on my mySQL server (version 5.1.30) and I can see, that the problem is a missing value for the lastMessageIDViewed. When I set it manual to ' ' the command runs perfect.

Are this 2 things known bugs
Are this 2 thigs a problem for a correct run of s game


Top
 Profile  
 
PostPosted: Sat Apr 04, 2009 8:37 pm 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
The first one (how gamemaster always says it's an error) is just a workaround. Rather than write an entire setup to generate the page it just makes use of the error functions that had already been written.


Top
 Profile  
 
PostPosted: Sun Apr 05, 2009 5:13 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Find
Code:
list($maxmessageid) = $DB->sql_row("SELECT MAX(id) FROM pD_ForumMessages");

replace with
Code:
$maxmessageid=0;
         list($maxmessageid) = $DB->sql_row("SELECT MAX(id) FROM pD_ForumMessages");

(Somewhere in gamemaster/)

This problem is because it assumes there are posts in the forum, but your forum is empty


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group