Nov 8, 2009

Mysql Error

free web hosting
Open Discussion > Xisto Network Sites > Trap17 dot NET Forum (Archive)

Mysql Error

Kider
a friend of a friend wrote a "dkp" program for a gaming guild. i managed to get everything setup on a free trap17.net server fine. the link is here

http://coh.trap17.net/dkp/

so on the trap17 phpmyadmin query sql function the make_db.sql that i have wasnt working right. i had to break it apart and add everything using phpmyadmin. the result was success.

so, i decided to buy webspace from computinghost.com so i could get our guilds website up, the same make_db.sql errored out at "default charset = latin1" i took all of those entries out of the script and tried again, and it worked. i assigned all the values and set everything up like it should, but now the dkp site looks like this..

http://crucibleofheroes.com/dkp/index.php

so, i jumped into the .php files to try and find out why the player and item functions on the site werent working right.

i have very limited knowledge of php and need some help on this one.

this first portion of code is from the raid section of the site.

CODE
$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);
if (!$result) { echo "  <p class=\"error\">Couldn't get set drop counts: " . mysql_error() . "</p>\n"; require 'footer.php'; exit; }
$isOdd = 1;
while ($row = mysql_fetch_row($result)) {
 if ($isOdd) echo "   <tr class=\"table-odd\">";
 else echo "   <tr class=\"table-even\">";
 echo "    <td class=\"table-primary\">$row[0]</td>
   <td class=\"table-numeric\">$row[1]</td>
   <td class=\"table-numeric\">$row[2]%</td>
  </tr>\n";
  $isOdd = !$isOdd;


i'm pretty sure the error is in this code somewhere.
please help! thanks in advance..

-Thomas

***edit***

that portion of script is from the index-items.php that i have

CODE
$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);
if (!$result) { echo "  <p class=\"error\">Couldn't get set drop counts: " . mysql_error() . "</p>\n"; require 'footer.php'; exit; }
$isOdd = 1;
while ($row = mysql_fetch_row($result)) {
 if ($isOdd) echo "   <tr class=\"table-odd\">";
 else echo "   <tr class=\"table-even\">";
 echo "    <td class=\"table-primary\">$row[0]</td>
   <td class=\"table-numeric\">$row[1]</td>
   <td class=\"table-numeric\">$row[2]%</td>
  </tr>\n";
  $isOdd = !$isOdd;



thanks..

Notice from BuffaloHELP:
Read my note below.

 

 

 


Comment/Reply (w/o sign-up)

BuffaloHELP
We have dedicated Trap17 dot NET forum. Please use the correct forum. When you post codes use CODE tag! This is your last cautionary note.

Use REPORT feature to edit or merge your posts. No double posting is allowed.

Check the php info link on Trap17.net to see the list of commands available. The reason dot NET is instant free hosting is due to not all php commands functions.

Moving to dot NET.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Mysql Error

  1. Phpmyadmin Problem! Internal Server Error - (3)
  2. Login Error - (9)
    I've been trying to login to trap17.net, and i keep getting the error:
    -------------------------- Internal Server Error The server encountered an internal error or
    misconfiguration and was unable to complete your request. Please contact the server administrator,
    server@xisto.com and inform them of the time the error occurred, and anything you might have done
    that may have caused the error. More information about this error may be available in the server
    error log. -------------------------- any ideas? ...
  3. Wordpress Blog Installation Error In Writing Db - (8)
    I've tried installing an older version of he blog (WP 1.2) At first seemed everything ok, but
    when i tried to install, at step 3 i got error in writing DB.. so i've deleted the database,
    restored it and start again.. but same problem.. the WP blog requires: * PHP 4.2 or greater *
    MySQL 3.23.23 or greater * The mod_rewrite Apache module is it ok for this MySQL DB? /huh.gif"
    style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> thanks guys...
  4. Help ! Trouble Installing A Blog - using MySQL database (1)
    ok guys.. here I am, marina from italy. so pardon my poor english. I'm NOT a programmer, so php
    e MySQL are quite "strange concept".. so please forgive me. I'm trying to installa a blog by
    WordPress( http://codex.wordpress.org/Installing_WordPress) i read all the tutorial, also a video
    one, very useful (http://www.optiniche.com/blog/freeview.php?v=wp-install) here teh problem.
    I've created the database, as read and seen in the upper files, changed the config.php as showns
    down, and uploaded everything CODE // ** MySQL settings ** // define('DB...
  5. Php / Mysql Database Connection / Creation Problems - (6)
    Hi, I'm new to Trap17. I have been trying to connect to mysql via a simple bread and butter php
    script but I don't seem to be getting anywhere. The script I'm using is below: CODE
    // set your infomation. $dbhost='localhost'; $dbusername='MyTrap17Username';
    $dbuserpass='MyTrap17Password'; $dbname='MyDatabaseName'; // connect to the mysql
    database server. mysql_connect ($dbhost, $dbusername, $dbuserpass); // create the database.
    mysql_query("CREATE DATABASE $dbname"); ?> Basically I'm trying to setup a ...
  6. Trouble Removing Account - Get an "Unknown" error. (1)
    I have been trying to remove my http://step.trap17.net account so I may instead register a
    nhbfan.trap17.net account, but for some reason, when I click the "remove account" button, I get
    transferred to a page that just says "Unknown" and my website is not removed....
  7. Database Error On Trap17 Dot Net - (3)
    hi, i'm trying to get some help with a mysql data base... when i enter the following into the
    query it errors out.. tell me to contact an admin to find out what wrong, i wrote them an email and
    wrote out a trouble ticket, but not help yet. i think it might have something to do with the "mode"
    the sql server is running on. any idea on how to change that or if i can? LOCK TABLES `Classes`
    WRITE; INSERT INTO `Classes` VALUES
    ('Druid'),('Hunter'),('Mage'),('Paladin'),('Priest'),('R
    ogue'),('Shaman'),('War...
  8. How To Set Mysql - (4)
    Anybody know how to set the database, i use the dot net space and upload a bbs, and setup
    successfully but when i try to manage my bbs, a erro was displayed and when try to register a
    member, whatever email you use, it says email wrong...
  9. Trap17.net Service Error - Getting an Internal Server Error (9)
    I'm getting the following error when submitting a PHP form on my site: QUOTE Internal
    Server Error The server encountered an internal error or misconfiguration and was unable to
    complete your request. Please contact the server administrator, server@xisto.com and inform them of
    the time the error occurred, and anything you might have done that may have caused the error. More
    information about this error may be available in the server error log. This only happens when I
    am trying to submit my new announcement to my mysql database. All of my other queries...



Looking for mysql, error

Searching Video's for mysql, error
See Also,
advertisement


Mysql Error

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com