Jump to content

crimsonmoon

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crimsonmoon's Achievements

Member

Member (2/5)

0

Reputation

  1. I just need to compare and make sure that user X has loaded this page within the past 5 seconds. Could I compare a PHP time variable maybe. I don't care if they run in more than once but I just want to keep it from running so fast that the script runs before I'm able to change the variables.
  2. I want to make it where every user can only access a certain script every 5 seconds. Would a session be the best way. Any examples anyone could share? Just trying to make sure that someone doesn't click so fast the script runs twice.
  3. Basically in my site many are opening tons of tabs and setting them to refresh at certain intervals which creates more load and creates an unfair environment for everyone else. Firefox or Opera does it easily. The only thing to to would be to increase the time allowed before a new page is allowed to open?
  4. Is that a way through coding to stop people from opening 1000 tabs and just refreshing them. I would like to place a limit on the number of tabs someone can have open.
  5. Would this still have some load being done several times? I went ahead and set it up different. I let them know if they are in the top 5 and then on the page that displays the ranking in detail I give the exact rank since that page only has one table call on it. The server likes it much better. Still if this would not have much load done 20 times on the page it would be nice.
  6. I might have to scratch that idea and just show it if they are in the top 5. The Issue I'm running into is I'm going to have around 20 of these rankings on one page and when you x that query by 20 I"m getting page load times around 1 to 3 seconds and I'm afraid if too many go to look it my really spike up the server load. I'm going to have an option to view all of that type on one page broken up by different pages so I'll just show it on there that why there's only one query.
  7. Tried that and it didn't work. here is what I have mysql_query("SELECT @rank:=0;"); $myrank = mysql_fetch_array(mysql_query("SELECT id,user,rankfield,@rank:=@rank+1 AS rank FROM table ORDER BY rankfield desc HAVING id=$user[id];")); Your Rank Is: <?php print "$myrank[rank]"; ?>
  8. The only way I can think of would be to do a select on the table and order by asc and then increment a PHP variable until $yourid = $select[yourid] or something and then print the value of the rank. I know that will work just fine. Just wondering if they was a select that would do it without need to loop through the entire table to find out.
  9. If I add the limit clause it won't pull the entire table of around 6000 rows. I want to take the table and sort it by a field and be able to pull a rank out for the current user no matter where they are. Is there any way to do this without make a PHP variable that increments until it picks you out.
  10. So the way it sounds there's not a way to do it limited without pulling the whole table. For intance I wanted to show the top five by doing a order by field asc limit 5 But to do this I have to search it until I find the right row. There'll be several of these charts on a page so I was trying to limit the load.
  11. I have a table with data in it. I sort that data by doing an order by FIELD ASC Now after doing my Order By how would I tell what rank or position one field was in the table. Basically I'm wanted to rank a bunch a field and let the user know what rank they are at.
  12. Also I've looked at Zend and it looks pretty good and says it works with Vista. They offer two version the pro and standard. I would probably still use it just like FP and hard code but I do notice the PRO includes an FTP feature. Is that worth another 200? Or should I just DL a program like smartftp or something?
  13. I know alot of you probably dropped your jaw at that title. I've always done my php editing in Frontpage and just hard coded as that gave me the most control. The reason I used Frontpage is my server has the extensions and I found it really easy to publish more than anything. They seemed faster than FTP and I liked how it kept the directory tree in tact. Anyways my home computer now has Vista on it and I heard about Expression Web so I bought it. It works like FP but royally messes up PHP with the Byte Mark Order it adds to every page. That stupid program cost me hours of time changing the ecoding on my files and fixing the issue. So here I sit...EW is on sale at ebay and I need a new editor/ftp. I'm not against paying as I code for a living and it's a tax deduction so what programs are good at this? I wouldn't complain if I had a cool editor that color coded some of the PHP though. Although if something would work free just as good as a pay feature I wouldn't be against that either. Keep in mind I also need something that will work on Vista Ultimate Edition. thanks!
  14. string(74) "http://www.toprpgames.com/vote.php?idno=437&field1=$var[id]&field2=$var2" http://www.toprpgames.com/vote.php?idno=437&field1=$var[id]&field2=$var2 when i try doing a $db['field'] i get the error about encapsulated white space [Wed Feb 28 21:54:18 2007] [error] PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
×
×
  • 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.