Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

ShoeLace1291's Achievements

Advanced Member

Advanced Member (4/5)



  1. change mine to ShoeLace1291 Please and thank you.
  2. So I'm making a roster section for my clan's website. I have two tables, one for networks(PC, Xbox Live, etc) and another for games(CS: Source, Halo, etc). The games table is linked to the networks table so the games can be "grouped" by networks. And I put the word grouped in quotations because I'm not actually grouping them in the queries. I just run a query that gets the networks and in that loop I query the games table based on the networkID of the game row. I am trying to store this information in an array so I can pass it through to another file. The problem is within my array structure, because the page displays the correct results for the first network, but in the second network the games from the first network are displayed. I hope I explained that clearly enough. So here is my code: $network_query = " SELECT * FROM ".DB_PREFIX."roster_networks ORDER BY title"; $network_query = mysql_query($network_query) or die(mysql_error()); if(mysql_num_rows($network_query) > 0){ while($network=mysql_fetch_assoc($network_query)){ $networks[$network['id']] = array( 'id' => $network['id'], 'title' => $network['title'] ); $games_query = " SELECT * FROM ".DB_PREFIX."roster_games WHERE networkID = ".$network['id']." ORDER BY title"; $games_query = mysql_query($games_query) or die(mysql_error()); if(mysql_num_rows($games_query) > 0){ while($game=mysql_fetch_assoc($games_query)){ $games[$game['id']] = array( 'id' => $game['id'], 'title' => $game['title'], 'icon' => '', 'record' => '', 'members' => '', 'status' => '' ); } } else { $games = array(); } $networks[$network['id']]['games'] = $games; } } else { $networks = array(); } I cannot figure out why this is happening. Anyone have any ideas?
  3. Ok, so I want to make a comment spam filter for my site. I know the basic logic, but have yet to figure out how to write the functions. I have a database table called comments that has a column called "time", which contains a unix timestamp value of when it was posted. Basically what I want to do is this: When a user tries to post a comment, the script determines with a database query if they have posted a comment in the last 120 seconds. So basically I have to find the current time, and the time it was 120 seconds before the current time. Then I have to find any comments posted by the user that were made after the 120 second mark. My database query should then look something like this, right? $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time > '".$120secondsago"'"); Please correct me if my logic is wrong, which it very well may be, but how would I find the unix timestamp code from 120 seconds before the current time? Note that 120 seconds is just an example and also that I have not worked with dates in mysql very often. $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time
  4. I just installed Ubuntu Linux today and Xampp right after. I got everything working, except for Xampp. Localhost loads fine and takes me to the Xampp language selection splash page, but none of the links work and I'm stuck at that page. I have absolutely no idea as to why this is happening. Any ideas?
  5. I don't think you understand what I'm getting at. Uploading the entire site at once every time I save a file would take way too freakin long... and I'm not talking about writing the script to do it. All I want is a text editor type of thing that will open the file from the web server by ftp and then automatically upload and overwrite the existing server file when I save the file onto my computer when I am satisfied with the changes.
  6. I'm looking for a certain software that I'm not sure even exists. What I want is something that will automatically upload your file to your website once you've saved it. I am sick of editing files and forgetting to upload it because of my own stupidity. I know you'll probably suggest Xampp or WAMP, but I want to be able to access the files from anywhere. Is there any type of software out there that has the capability of managing your entire website features such as file editing, MySQL, etc?
  • 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.