Multiple SQL Errors

Help and support in getting the EVE-Dev Killboard to run on your site.
alighieri
Greenhorn
Posts: 22
Joined: Sun May 27, 2012 11:56

Re: Multiple SQL Errors

Post by alighieri » Wed May 30, 2012 07:42

I still have the first error at api killog , when I update by api I got the error but update works
I update inferno database.

It seem an old killmail can't be imported...

If I clear cache I don' have the error but that message :
"Kill log exhausted (You can only fetch kills that are less than a month old): New kills will be accessible at: 2012-05-30 06:35:28. If you are not expecting this message it is possible that some other application is using this key!"
but it's normal I think.

User avatar
StinGer_ShoGuN
Apprentice
Posts: 67
Joined: Sat May 26, 2012 13:09
Location: Universe > Milky Way > Solar System > Earth > France > Paris
Contact:

Re: Multiple SQL Errors

Post by StinGer_ShoGuN » Fri Jun 01, 2012 17:17

The message you get is normal: once you've cleaned cache, there is no more XML feed. Hence, the KB tries to fetch a new one. But the API server denies your request because you've asked for it too shortly since the last fetch.

So you have nothing to parse, hence no errors. I bet next time you'll fetch killmails from API, errors will be back...

Then about the update, if you are now running an Inferno database, you will have errors parsing old mails as modules and ammos will have old names. Look around in Support, many people have that problem and there are no real solutions... For now...
Why drink and drike when you can smoke and fly ?
Pragmatic Kernel, c'est plus fort que toi !

squizz
Greenhorn
Posts: 11
Joined: Wed Dec 30, 2009 22:57

Re: Multiple SQL Errors

Post by squizz » Fri Jun 01, 2012 17:48

Requiring the user to upgrade to the newest database is a hack when the problem lies within the code itself.

I'll put it simply, then outline the solution to fixing the problem:

Problem:

New item is being fetched via a feed, api, whatever. This item has a typeID that is not in the kb3_invtypes table, therefore returning an empty result on a particular query. Later code then attempts to use this result in yet another query. However, since the code concatenates the query together, and the previous query's result has no value, there is nothing to concatenate and the query is improperly built, resulting in the SQL error outlined in the OP.

Solution:

Check the result for no value and assign a worthless value so that the query properly executes without an error:

- Open common/includes/class.item.php, move to line 150 (may be different in different version of EDK, this is for v4.04)
- Modify the line to the following:

Code: Select all

     and d.typeID = " . (isset($this->row_['typeID']) ? $this->row_['typeID'] : -1) ."
- Save and exit

Solution II:

The killboard is capable of fetching unknown items, you just have to tell it to do so by default.

- Open common/includes/api/class.helper.php
- Modify line 22 (once again, approximate)
- Change the default value of $update from false to true
- Save and exit

Disclaimer: These solutions have worked for me and a few others. Good luck!

Zagdul
Greenhorn
Posts: 37
Joined: Mon Jul 12, 2010 02:55

Re: Multiple SQL Errors

Post by Zagdul » Sat Jun 02, 2012 18:33

squizz wrote:Requiring the user to upgrade to the newest database is a hack when the problem lies within the code itself.

I'll put it simply, then outline the solution to fixing the problem:

Problem:

New item is being fetched via a feed, api, whatever. This item has a typeID that is not in the kb3_invtypes table, therefore returning an empty result on a particular query. Later code then attempts to use this result in yet another query. However, since the code concatenates the query together, and the previous query's result has no value, there is nothing to concatenate and the query is improperly built, resulting in the SQL error outlined in the OP.

Solution:

Check the result for no value and assign a worthless value so that the query properly executes without an error:

- Open common/includes/class.item.php, move to line 150 (may be different in different version of EDK, this is for v4.04)
- Modify the line to the following:

Code: Select all

     and d.typeID = " . (isset($this->row_['typeID']) ? $this->row_['typeID'] : -1) ."
- Save and exit

Solution II:

The killboard is capable of fetching unknown items, you just have to tell it to do so by default.

- Open common/includes/api/class.helper.php
- Modify line 22 (once again, approximate)
- Change the default value of $update from false to true
- Save and exit

Disclaimer: These solutions have worked for me and a few others. Good luck!
Someday, CCP will include the typeID in the killmail.

Someday...

rypticus
Greenhorn
Posts: 17
Joined: Fri Oct 05, 2012 14:51

Re: Multiple SQL Errors

Post by rypticus » Wed May 22, 2013 20:07

I have having this same problem, how did you fix it?

Database 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 'and d.attributeID in (137,602)' at line 5
SQL: select itt_slot from kb3_item_types inner join kb3_dgmtypeattributes d where itt_id = d.value and d.typeID = and d.attributeID in (137,602);
ERROR [256] SQL 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 'and d.attributeID in (137,602)' at line 5
Error on line 46 in file /home/vincent/public_html/killboard/common/includes/class.dbnormalquery.php
PHP 5.3.16 (Linux), EDK 4.0.4 (Crucible)
File: /home/vincent/public_html/killboard/common/includes/class.dbnormalquery.php, line: 46, function: trigger_error
File: /home/vincent/public_html/killboard/common/includes/class.item.php, line: 152, class: DBNormalQuery, function: execute
File: /home/vincent/public_html/killboard/common/includes/class.idfeed.php, line: 806, class: Item, function: getSlot
File: /home/vincent/public_html/killboard/common/includes/class.idfeed.php, line: 556, class: IDFeed, function: processItem
File: /home/vincent/public_html/killboard/common/includes/class.idfeed.php, line: 485, class: IDFeed, function: processKill
File: /home/vincent/public_html/killboard/common/includes/class.idfeed.php, line: 138, class: IDFeed, function: processFeed
File: /home/vincent/public_html/killboard/common/includes/api/class.killlog.php, line: 128, class: IDFeed, function: read
File: /home/vincent/public_html/killboard/common/admin/admin_api.php, line: 118, class: API_KillLog, function: Import
File: /home/vincent/public_html/killboard/common/index.php, line: 293, function: include
File: /home/vincent/public_html/killboard/index.php, line: 27, function: include

rypticus
Greenhorn
Posts: 17
Joined: Fri Oct 05, 2012 14:51

Re: Multiple SQL Errors

Post by rypticus » Wed May 22, 2013 20:14

I have fixed the errors I was getting when pulling from api thanks to Squizz's post however I still get the errors when trying to pull old kills from eve-kill. I have been searching for like a week for a solution to this problem. Any help would be much appreciated.

rypticus
Greenhorn
Posts: 17
Joined: Fri Oct 05, 2012 14:51

Re: Multiple SQL Errors

Post by rypticus » Wed May 22, 2013 20:17

How do you update to new database?

blowfish
Noob
Posts: 7
Joined: Tue Jul 24, 2012 15:13

Re: Multiple SQL Errors

Post by blowfish » Thu Jun 06, 2013 19:23

Trying to find the download first :)

blowfish
Noob
Posts: 7
Joined: Tue Jul 24, 2012 15:13

Re: Multiple SQL Errors

Post by blowfish » Sat Jun 08, 2013 19:15

I seems EDK is dead as its useless without an update.... :(

User avatar
Salvoxia
Developer
Posts: 1515
Joined: Wed Feb 22, 2012 12:11

Re: Multiple SQL Errors

Post by Salvoxia » Sat Jun 08, 2013 19:21

You saw this thread?
viewtopic.php?f=503&t=21587

Post Reply

Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests