Jump to content


Need Help with mysql...

  • Please log in to reply
1 reply to this topic

#1 Kider

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 03 February 2006 - 12:40 AM

ok, i'm trying to setup a script for a dkp system for a gaming guild.

it should look like this

[a href=\"http://coh.trap17.net/dkp/\" target=\"_blank\"]http://coh.trap17.net/dkp/[/a]

i managed to get it to work on this site because its running mysql 4.1

computinghost.com (mysql 4.0) is where i'm trying to upload it now. the DEFAULT CHARSET = LATIN1 command wasnt working, so i took it outta the installation script. the script went through and everything seems fine.
but when i go to


its errored out on portions of the site, the DKP and the ITEMS portion have sql errors.

here is the code for the errors..

first error that is from [a href=\"http://crucibleofheroes.com/dkp/index.php\" target=\"_blank\"]http://crucibleofheroes.com/dkp/index.php[/a]

$query = "SELECT P.name, SUM(CASE WHEN B.item IS NULL THEN D.amount ELSE D.amount*-1 END) AS total, P.class, $FEE_PER_SET*((SUM(CASE WHEN B.item IS NOT NULL OR R.instance = 'Correction Entry' OR R.date < '2005-10-02' THEN 0 ELSE 1 END)-1) DIV $RAIDS_PER_SET + 1)-P.debt AS debt_incurred FROM DKP D, Players P, Raids R LEFT JOIN Bids AS B ON B.change_id = D.change_id WHERE D.name=P.name AND D.raid_id = R.raid_id GROUP BY P.name ";

and 2nd error code from [a href=\"http://crucibleofheroes.com/dkp/index.php?show=items\" target=\"_blank\"]http://crucibleofheroes.com/dkp/index.php?show=items[/a]

$result = mysql_query("SELECT S.name, COUNT(*), (COUNT(*)/(SELECT COUNT(*) FROM Bids))*100 FROM Bids B, Sets S WHERE B.item LIKE S.pattern AND S.tier = $tier GROUP BY S.name;", $db);

i need both of these sql portions to work with mysql 4.0.

thanks for taking the time to view my post.

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 February 2006 - 08:34 AM

See my response on [a href=\"http://www.mysqlfreaks.com/forums/index.php?showtopic=9018&st=0&\" target=\"_blank\"]this MySQLFreaks.com thread.[/a]
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users