bizzlesnaff / mwenhanced

Automatically exported from code.google.com/p/mwenhanced
0 stars 1 forks source link

SQL Error #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. going to the forums
2. going to a thread
3. Error at top

What is the expected output? What do you see instead?
Expect to see just the thread but im getting errors above the thread with
the following;
SQL Error: Unknown column 'c.data' in 'field list' at
/home/sysgamin/public_html/core/class.auth.php line 125

Array
(
    [code] => 1054
    [message] => Unknown column 'c.data' in 'field list'
    [query] => SELECT count(*) FROM pms WHERE owner_id='9' AND showed=0
    [context] => /home/sysgamin/public_html/core/class.auth.php line 125
)

SQL Error: Unknown column 'c.data' in 'field list' at
/home/sysgamin/public_html/templates/offlike/body_header.php line 181

Array
(
    [code] => 1054
    [message] => Unknown column 'c.data' in 'field list'
    [query] => SELECT `id`,`name` FROM `realmlist` ORDER by id DESC
    [context] =>
/home/sysgamin/public_html/templates/offlike/body_header.php line 181
)

What revision of the product are you using? In what browser?
rev40 FireFox 3

What version are you using? MangosWeb or TrinityWeb?
MangosWeb

Please provide any additional information below.

Happens in the admin panel aswell at times.

Original issue reported on code.google.com by fullalliance on 12 Apr 2010 at 6:56

GoogleCodeExporter commented 9 years ago
I have the same problem with TrinityWeb.
It happened when I updated the server and database to 3.3.3a.
Also the honor, players online, characters, playermap and armory pages do not 
work 
anymore. And in the forum the avatars, race, class and level of characters 
don't show 
up.

I discovered these problems arised because the column data in characters was 
removed 
with 3.3.3a. Though I don't know about the sql error, I fixed the error by 
changing 
something in the sql syntax I think.

Anyway, I would like this to be fixed as soon as possible because going back to 
3.3.2 
is not an option just like putting the data column back. The query's should use 
the 
other columns for the info.

Original comment by roelverheggen3006@gmail.com on 12 Apr 2010 at 10:57

GoogleCodeExporter commented 9 years ago
     roelverheggen3006 are you getting the issue of sending donation items aswell? I
get cannot send mail contact admin

Original comment by fullalliance on 12 Apr 2010 at 11:07

GoogleCodeExporter commented 9 years ago
I didn't try that yet with 3.3.3a but it worked with 3.3.2

Original comment by roelverheggen3006@gmail.com on 12 Apr 2010 at 12:11

GoogleCodeExporter commented 9 years ago
I fixed this problem on my local copy. It was fairly easy. In most cases, just 
changing the 'data' column query to 'level' on each php page with the issue 
worked.

Original comment by CriBol...@gmail.com on 12 Apr 2010 at 5:02

GoogleCodeExporter commented 9 years ago
Sorry to post again, but here's an example of how this is patched.

in server.chars.php there is a line that reads

$query1 =  $CHDB->select("SELECT `guid`, `name`, `race`, `class`, `zone`, CAST
(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',".($MANG->charDataField
['UNIT_FIELD_LEVEL']+1)."),' ',-1) AS UNSIGNED) AS `level`,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',".($MANG->charDataField
['UNIT_FIELD_BYTES_0']+1)."),' ',-1)  AS UNSIGNED) AS `gender` FROM 
`characters` 
$filter ORDER BY `name`  LIMIT $limit_start,$items_per_pages");

by just editing this line to say

$query1 =  $CHDB->select("SELECT `guid`, `name`, `race`, `class`, `zone`, 
`level`,
`gender` FROM `characters` $filter ORDER BY `name`  LIMIT 
$limit_start,$items_per_pages");

it pulls the data from the new columns rather than the old data column (note, 
in 
this case, both level and gender are new columns)

Original comment by CriBol...@gmail.com on 12 Apr 2010 at 5:09

GoogleCodeExporter commented 9 years ago
oh, well I already did it but forgot to post here.
I wasn't sure for the honor page, I think the ranks are not correct yet.
The biggest problem is the armory but this is not really part of 
trinity/mangosweb.
Nothing of the armory works except for the items, I looked at it but seemed 
hell a lot 
of work to fix it.

Original comment by roelverheggen3006@gmail.com on 12 Apr 2010 at 6:01

GoogleCodeExporter commented 9 years ago

Original comment by wilson.steven10@gmail.com on 13 Apr 2010 at 3:00