Jump to content

sp@rky13

Members
  • Posts

    116
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.sparky13.co.cc

Profile Information

  • Gender
    Not Telling

sp@rky13's Achievements

Member

Member (2/5)

0

Reputation

  1. I asked about this on my hosting's forum and got an answer quicker so it's solved
  2. Im' doing it as a cron job and get this error:
  3. So I'm doing this to import and unzip a text file: cd www/tw/data/9 && rm village.txt.gz ; wget http://en9.tribalwars.net/map/village.txt.gz && rm village.txt ; gunzip village.txt.gz And then to put it into a database I tried this but it failed: $connection = mysql_connect("*********","********","*********"); mysql_select_db("********", $con); mysql_query("TRUNCATE `village9`"); $load = mysql_query("LOAD DATA LOCAL INFILE '../data/9/village.txt' INTO TABLE `village9` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (id, name, x, y, owner, points, rank)"); if (!$load) { die('Invalid query: ' . mysql_error()); } Anyone see the problem?
  4. ok I haven't used heaps of php so I'm guessing kinda. I found this article here and by what I see, you've cut something from the code there though I'm unsure lol. But considering this: So I'd say that is it but I am totally unsure EDIT: Also, please try to use a more descritive title like: "wordpress them customization" ect. Also, i always to be safe open what I need in new windows in new windows. You can do this (normally) by clicking in the scroll bar thingo on your mouse
  5. So I have a form that gets submitted by get method. How can I then add a box at the bottom with what the result would be? It would need to keep what you filled in in the form at the top filled in, though.
  6. Thank you very much. Bery simple but very frustrating
  7. So I have this code: <?php $x = $_GET["x"];?> <?php $x1 = $_GET["x1"];?> <?php $x2 = $_GET["x2"];?> <?php $y = $_GET["y"];?> <?php $y1 = $_GET["y1"];?> <?php $y2 = $_GET["y2"];?> <?php $k = $_GET["k"];?> <?php $k1 = $_GET["k1"];?> <?php $world = $_GET["world"];?> <?php $vpt_sub = $_GET["village/player/tribe_submit"]; ?> <?php [b]if ($x=='on' AND $y=='' AND $k=='') $include = "AND x BETWEEN '$x1' AND '$x2'"; else if ($y=='on' AND $x=='' AND $k=='') $include = "AND y BETWEEN '$y1' AND '$y2'"; else if ($y=='on' AND $x=='on' AND $k=='') $include = "AND x BETWEEN '$x1' AND '$x2' AND y BETWEEN '$y1' AND '$y2'"; else if ($y=='' AND $x=='' AND $k=='') $include = ""; [u]else if ($y=='' AND $x=='' AND $k=='on') $include = $BetweenClause;[/b][/u] $yLow = floor($k1 / 10) * 100; $yHigh = $yLow + 99; $xLow = ($k1 % 10) * 100; $xHigh = $xLow + 99; $BetweenClause = "x BETWEEN $xLow AND $xHigh AND y BETWEEN $yLow AND $yHigh"; $con = mysql_connect("****","*****","*****"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("*****", $con); $result = mysql_query("SELECT village9.village, player9.name, tribe9.tag, village9.x, village9.y FROM village9 JOIN player9 ON village9.player = player9.id JOIN tribe9 ON player9.tribe = tribe9.id WHERE tribe9.tag = 'vpt_sub' $include") or die(mysql_error()); $stop=mysql_num_rows($result); $i = 1; while($row = mysql_fetch_array($result)) { echo "$i".". "."[player]".$row['name']."[/player]"." - "."[village]".$row['x']."|".$row['y']."[/village]"."<br>"; $i++; } mysql_close($con); ?> Note the "$include = $BetweenClause;" How can I do that as such as that does not work?
  8. I guess you're getting somewhere as in they now realise there is a problem :| but no solution as of yet
  9. That is true. I'mnot. It contains simalar data but I'm not connecting to the same database for the one I'm uploading as I'm using someone elses database though I have a database I can test on which is what I checked. I'll go query my database EDIT: My database worked fine though the other one still isn't working . You guys probably can't help me anymore. Thanks heaps though for all the help and sorry about my stupidity
  10. is it more of dots for a thing on the map?
  11. FYI. You didn't do a good job at hiding the URL working fine for me lol. First screen shot has it and the tab in the second or third
  12. It works fine in the php my admin so yah, i don't know what the issue is
  13. I swapped the $world's with the 9 already and the decleration is fine I'm pretty sure
  14. I apologise for my stupoiduty lol though I'm still getting errors. My new error is:
  15. This is what I have: $result = mysql_query("SELECT * FROM village9 JOIN player9 ON village9.player = player9.id JOIN tribe9 ON player9.ally = tribe9.id WHERE tag = 'dns';"); or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo "[village]".$row['x']."|".$row['y']."[/village]"."<br>"; } I was confused about the colon. did you guys add it in?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.