dangmnx's Profile User Rating: -----

Reputation: -1 Dishonored
Group:
Active Members
Active Posts:
387 (0.26 per day)
Joined:
10-April 09
Profile Views:
5,542
Last Active:
User is offline Aug 26 2011 01:20 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Chevrolet
Dream Kudos:
0

Latest Visitors

Icon   dangmnx PHP!

Posts I've Made

  1. In Topic: Inner Join

    Posted 26 Aug 2011

    <?php
    $USERS_PER_PAGE = 20; //number of users to be displayed on one page
    
    $tbl_name="forum_question";
    $tbl_name2="forum_answer";
    $max_pages = 0;
    $query = "SELECT COUNT(*) as num FROM $tbl_name ORDER BY reply DESC;";
    $result = mysql_query($query);
    if ($result !== false) {
    	$row = mysql_fetch_assoc($result);
    	$max_pages = ceil($row['num'] / $USERS_PER_PAGE);
    }
    
    $page = 1;
    if (isset($_GET['page'])) {                                                  
    	$page = intval($_GET['page']);
    	if ($page < 1) { $page = 1;}
    	if ($page > $max_pages) { $page = $max_pages; }
    }
    
    
    $limit = ' LIMIT '.($page-1)*$USERS_PER_PAGE.', '.$USERS_PER_PAGE.' ';
    $query = mysql_query("SELECT * FROM $table_name INNER JOIN $table_name2 ONE table_name.name = table_name2.a_name ORDER BY a_datetime DESC $limit");
    printPagination($page, $max_pages, 'main_forum.php?');
    while ($rows = mysql_fetch_assoc($query))
    {
    ?>
    


    I'm getting an

    Quote

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/web04/b2008/moo.battlesccom/main_forum.php on line 171
  2. In Topic: Count values

    Posted 19 Aug 2011

    I'm trying to retrieve the user with the most post.
  3. In Topic: DDOS attack.

    Posted 14 Aug 2011

    Thank you.
  4. In Topic: Ranking system

    Posted 9 Aug 2011

    Okay So is it possible for me to just go back and simplify one part of the code? I want to simply
    S rank vs S rank
    
    . and winner gets
    +75 loser get -100.
    


    Sort of like:
    // S vs S rank
    if ($difference == 10){
    $points = $points + 75;
    $points1 = $points1 - 100;
    }
    


    But I'm afraid the

    // D vs D rank
    if ($difference == 0){
    $points = $points + 65;
    $points1 = $points1 - 30;
    }
    


    Won't allow me to do that.
  5. In Topic: resizing images

    Posted 28 Jul 2011

    Well, Yes, but I can upload a signature that is 500x500. and It wont re size that.

My Information

Member Title:
D.I.C Regular
Age:
24 years old
Birthday:
November 27, 1988
Gender:
Location:
Dallas Tx
Interests:
PHP! i would like to be an expert at it one day!
Programming Languages:
HTML, and a bit of PHP,

Contact Information

E-mail:
Click here to e-mail me
AIM:
AIM  aiitexx
Website URL:
Website URL  http://www.starcraftx.com

Friends

Comments

dangmnx has no profile comments yet. Why not say hello?