Jump to content

u214

Members
  • Posts

    46
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

u214's Achievements

Member

Member (2/5)

0

Reputation

  1. Alright, for the first question: Kills, Deaths, and Level are all stored in the User's table. I successfully got the Kills and Deaths, but can't get the sum of Levels above 0. Also, if the "FROM".. is in the wrong place, mind explaining / pointing out where it should be? Thanks. Second question: Let's say I have 5 tables. I want to get the # of rows of each table using 1 query. Hope that clears some misunderstandings.
  2. Hi, so this is my code right now: SELECT SUM(Kills) AS g_killz, SUM(Deaths) AS g_deathz, SUM(Level) AS g_admins WHERE Level > 0 FROM Users The Level part is messing the whole query. How would I get the sum of Level greater than 0. ------------ How can I get the SUM of rows from multiple tables in 1 query? Pretty sure a query per table isn't the best thing to do!
  3. I'm trying to get the following query to work: SELECT * FROM `Bans` WHERE (`BannedIP` = 76 AND `BannedSerial` = '4208394871238478ffbb13434') OR `BannedName` = 'Test' -- So as you can see, I want if the BannedIP = 76 AND BannedSerial = 4208394871238478ffbb13434 OR BannedName = Test it will return a row The reason why I'm doing this is because the serial is not unique and having the part of ip and serial together will reduce the chances of someone getting wrongfully banned. In PHP, it would look something like: if(($IP=76 && BannedSerial='serial') || BannedName='Test') Note: BannedSerial is made up for this example; BannedIP = first 2 digits of an ip. EDIT: I tested it with my name and it only works after the OR BannedName = 'myrealname'. So the thing that's messed up is this: (`BannedIP` = 76 AND `BannedSerial` = '4208394871238478ffbb13434')
  4. The colors are alright. I don't really like pix-elated images ( The Follow Tap't In ones ), I would get a higher reso / better logos. The middle of the page looks too crowded, you should space them right/left more. Other than that, looks good.
  5. It's a bit plain as they mentioned. I'm a big fan of colors that go well together, I don't think "Yellow", "White", and "Black" go well together. Maybe if you reduce the white color, it would look better. Not bad though
  6. I wasn't sure where to ask this question, so I decided to ask here since it might require PHP alone to do the job. So, I recently changed from MySQL to SQLite ( Speed performance in the servers I run. (Not websites) ), so I was wondering if its possible to retrieve info from SQLite DB and display it on the website. I know how to do it with MySQL. The SQLite DB is located on an FTP server, so I will use ftp functions to get the data. So, if It's possible, can ya give me a small example on how to achieve this? Thanks.
  7. It's a nice website. Nice navigation! I also love the art that is presented. Overall, nice website, nice colors, nice content.
  8. I appreciate both answers and the code posted. Not exactly what I'm looking for. I should've explained my problem more in detail. Let's say I have this rows: (BannedName)(IP) (Reason) (Date) (Admin) bash1tro. 192.168.0.111 No Reason Give June 28, 2011 - 19:41:49 Admin bash1troo. 192.168 No Reason Given June 28, 2011 - 19:45:08 Admin bash1tro.. 192.168.0.112 No Reason Given June 28, 2011 - 19:45:09 Admin -- As you can see the similarities. The player is still joining the server. Is there a syntax like "strfind" but on that query?
  9. Hey guys. Ok, let's say I have this query: "SELECT * FROM playerbans WHERE BannedName = 'something' OR BannedIP = '192.168.0.1'" How can I make the "BannedIP" be detected all or just part of it? Lets say, "192.168.0" Will still detect that field?
  10. Ah, thank you. It's working now!
  11. Hey guys. I finally decided to make my pagination webpage with the help of this tutorial: Here I gotta say, it's an awesome, easy to follow tutorial! -- Ok, so I finished mine. It's working perfectly, but somehow when I'm on the first page, it doesn't show the css styling.. Everything after page 1 works like it should. It's just that start page that keeps bothering me. Here's the page with the bad style: Click Here's the page with the working style(Anything after this page works perfectyl): Click Here's the code: <?php include("config.php"); $result = mysql_query("SELECT COUNT(*) FROM playerinfo", $connect); $r = mysql_fetch_row($result); $numrows = $r[0]; $rowsperpage = 10; $totalpages = ceil($numrows / $rowsperpage); if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) { $currentpage = (int) $_GET['currentpage']; } else { $currentpage = 1; } if ($currentpage > $totalpages) { $currentpage = $totalpages; } if ($currentpage < 1) { $currentpage = 1; } $offset = ($currentpage - 1) * $rowsperpage; $sql = "SELECT user, Registered FROM playerinfo LIMIT $offset, $rowsperpage"; $result = mysql_query($sql); echo "<table width=720><tbody> <tr> <th width=20><span class='table-header'>Player Name:</span></th> <th width=20><span class='table-header'>Date Registered:</span></th> </tr>"; while ($list = mysql_fetch_assoc($result)) { echo "<tr><td><a href='http://yu-ki-ko.com/fsns/PStats.php?User=".$list['user']."'>".$list['user']."</a></td>"; echo "<td>".$list['Registered']."</td></tr>"; } echo "</tbody></table>"; $range = 3; if ($currentpage > 1) { echo "<div class='pagination'><a href='{$_SERVER['PHP_SELF']}?currentpage=1'><<</a>"; $prevpage = $currentpage - 1; echo "<a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'><</a>"; } for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) { if (($x > 0) && ($x <= $totalpages)) { if ($x == $currentpage) { echo "<span class='current'>$x</span>"; } else { echo "<a href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a>"; } } } if ($currentpage != $totalpages) { $nextpage = $currentpage + 1; echo "<a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'>></a>"; echo "<a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages'>>></a></div>"; } ?> (Comments removed to make it more readable) I'm sorry if this is not the correct board to post this, but it has a combination of PHP + HTML.
  12. Looks too dull. Black and white gradient isn't the best choice. The middle area "DJ Title" needs work. Other than that, I don't see anything else wrong.
  13. Thanks YoungNate_Black_coder. I'll get that fix asap @ KingPhilip - Wow dude. Is there more info about that? Something I can change in the code? One of my friends also told me about that! I don't see anything wrong since its just a simple control panel with statistics loading from MySQL. More info will be appreciated. Thanks again for the feedback. Edit: Ok, the variable problem should be fixed. Misspelling mistake. Also, I found this one the web "Well it's not a "phishing" site since a "phishing" site is a site trying to act like the original site." Does it show phishing because my partner is "hosting" the domain?
  14. So I would like to know how to make pages? Let's say I have a query: SELECT * FROM test ORDER BY testid ASC So if the table "test" has 100 rows, how can I make below the results, pages: 1 - 10. Hope y'all get what I mean. Thanks!
  15. Hello guys. My website ain't that "Huge" of a deal, but I'm willing to learn from my mistakes. If y'all find any security holes, let me know. Website: http://yu-ki-ko.com/fsns/ Verification: http://yu-ki-ko.com/fsns/proof.txt You can log into the account using: Username: Test Password: Test Thank you!
×
×
  • 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.