Jump to content

jaydee

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jaydee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a lot for that! Worked great!
  2. Hey, I'm sure this is fairly simple but I've been coding hard every day for the past week that I've reached that point where even remembering what global variables I've set is a problem! Right. I have 2 tables this concerns, the `users` one and the `positions` one. Basically users buy the positions and so the link between them that is in the 'positions' table it has the username of it's owner. Where I come upon a problem is the positions earn money (affiliation) and this is done manually at the end of each day. BOTH need to be updated but what happens is positions are selected on certain criteria and only those ones are paid. So what is the best way to update both with the new information (position table just positionearnings+$addedtoday and users table just balance+$addedtoday)? The positions one is easy but the only way I can see really is to have a while loop that would grab the username for that position, then update the users table 1 at a time. But there are at least 1000 positions that are paid every day so that would mean 1000 statements. I'm happy to go with this if there won't be any problems since it's just once per 24 hours but I'm SURE there's a easier way like creating a while loop that just adds a 'OR' trigger to a mysql statement so all users affected are updated in a single statement. Thanks in advance for any help! If you need more info let me know.
  3. I tried print before, using same as what you've just posted and it failed, because of a bonehead mistake! I put the </select> in the loop, so it'd only do the first page then the rest showed up as just text so pretty stupid of me, that works perfect, thanks a lot, amazingly quick response too!
  4. I'm coding a forum, it's all mostly done I'm just sorting the paging. Now, I know how to create page links etc and do all that, but I want them to appear in a dropdown box, not just links. Again, I know how to make it so when they select from the dropdown it will redirect to the relevant page it's just getting the amount of pages into the dropdown. The basic code is :(pcounter is the max amount of pages, worked out earlier in the script by dividing amount of forum posts by 10. ) $i=1; for($i = 1; $i <= $pcounter; ++$i) { <select name='NavSelect' onChange='Navigate(this.form)'>"; <option value='$i'>Page $i of $pcounter </select> That works sort of, it displays all of the pages but all in different dropdowns, so theres 4 pages, 1st dropdown Page 1 of 4, 2nd dropdown Page 2 of 4 etc I want them all in one dropdown, I've tried alsorts like starting the select box before the for() loop starts but that causes more problems!! Any suggestions?
×
×
  • 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.