Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. Try using the explode() function.
  2. What? Isn't one of the major advantages of tabs that it prevents your taskbar getting littered?
  3. GingerRobot

    C++

    Though i've not used it extensively, MinGW seemed to work ok with C and there's an option to install the C++ compiler.
  4. Forgive me, but how can you be both a Jew and an atheist?
  5. My major gripe with UAC is that it asks you every single time, even if you've just performed the exact same action.
  6. You don't need a comma to separate the ORDER BY clause.
  7. The first part of your intended look can be achieved by the following: 1.) Order the result set by the coupon id. 2.) Loop through the results, keeping track of the coupon id of the previous loop. 3.) If the coupon id of the current row is different to that of the previous row, then end the table, and set the previous coupon id to the current id. Here's the general idea: $sql = "SELECT ... ORDER BY couponid"; $result = mysql_result($sql); $previd = ''; while($row=mysql_fetch_assoc($result)){ if($row['couponid'] != $previd){ $previd = $row['couponid']; echo 'Coupon: '.$row['couponid'].'<br />'; } //echo row information - event, bet etc } As for the summary at the end of your ouput - how is it calculated? Shouldn't total winnings just be a summation? In which case, add that to the loop and echo it out when the coupon id changes.
  8. At the end of the query? How about showing us what you actually tried? And tell us what happened when you tried that.
  9. To be fair, this isn't something exclusive to windows is it?
  10. Wait. You're using IE? Disclaimer: I'm generally also against the MS bashing. With the exception of IE.
  11. Didn't quite a lot of them get mangled though?
  12. I managed to get MinGW to work, thank god. Thanks for all the input.
  13. As i say, it's not actually for me. Hence the need for it to be simple. Ill take a look tomorrow though, so thanks for the input. On the plus side, i did manage to get this MinGW gcc port thingy working on my machine, so that's something else to look at.
  14. Yep. Ridiculously confusing. And i couldn't work out what, if any, standard was being used when the program was compiled . Tried that. Quite a few times :s Yeah, it looks like it's optional. Is Cygwin easy to use? I've no experience with it at all.
  15. Edit: That's embarrassing. Meant to post under Misc :s. Can someone move this for me? Ok, so i'm banging my head against the wall here. I'm having real troubles finding a way to compile c programs under windows on a friend's machine. I generally develop in linux but do have Bloodshed Dev-C++ installed in windows should I need it. A friend of mine isn't exactly computer minded, but part of her engineering mathematics course included c programming. She wanted to be able to try some of the programming at home, but whatever I try, i can't get anything to compile. I used the exact same installer for Dev C++ as is on my laptop, but got error messages(first, gcc couldn't find cc1 - whatever that means. After finding an apparent fix for that, it attempted to compile but with a load of errors in stdio.h - go figure) Since, i've tried all sorts of things. Under an academic license we can install Visual Studio for free, so I tried that but it's bloody confusing. I couldn't work out what the hell it was using to compile and it was all a bit over the top. Tried a couple of gcc ports, but to no avail. MinGW (which our department recommends) started to download the installer then fell over - looks like a problem with the sourceforge website. Tried a different one, gcw, which looks decidedly incomplete. So, long story short, any suggestions? Do you guys use anything in particular?
  16. Try: <?php $str = "Test \n Test \n\n\n\n\n Test \n \n \n \n \n Test"; $str = preg_replace("|(\\n\s*){3,}|s","\n\n",$str); echo nl2br($str); ?>
  17. Ok, so as suspected, the problem is with $ME. Take a look at the link it's generating: <a href="http://?mode=add">[+C] Add Category</a> There are plenty more like that, and they're all badly formed links. To fix, we'll need to see the code for qualified_me(). Or, switch to using $_SERVER['PHP_SELF']. You are correct that you could make $ME equal to $_SERVER['PHP_SELF']. I would imagine that you got an error because you missed off the semi colon at the end of the line. Basically, you need to find where you define $ME (e.g. $ME = qualified_me() and change it to: $ME = $_SERVER['PHP_SELF']; As for the final error, well, it's exactly as it says. The function pv() hasn't been defined. It has nothing to do with the fact $id isn't set (though, you would likely get a different error once you fix this one all the while $id isn't it). Did you forget to include a file with the definition in it?
  18. Do you mean a list of mime types? http://www.iana.org/assignments/media-types/
  19. If you wanted someone to do this for you, you need to head over to the freelance forum. Otherwise, i'd say search for some beginner cURL tutorials. The process is going to be pretty much the same. If you run into troubles, then post with what you have so far.
  20. I like my desktop tidy: http://img404.imageshack.us/img404/5829/desktopuv3.jpg No point in posting my Ubuntu one -it's unchanged from the default.
  21. That's not how the selected attribute works - it's an attribute of the option tag. Presumably you are using a loop to generate the options? If so, you should add in something that checks of the current iteration of the loop is the same as $country. If it is, add the selected attribute. Something along the lines of: foreach($options as $option){ $selected = ($option==$country) ? 'selected="selected"' : ''; echo '<option value="'.$option.'" '.$selected.'>'.$option.'</option>'; }
  22. Regex? <?php $str = "Test \n Test \n\n Test \n\n\n\n\n Test"; $str = preg_replace("|(\\n){3,}|s","\n\n",$str); echo nl2br($str); ?>
  23. GingerRobot

    Wubi

    Ubuntu's never caused a problem with an existing windows installation for me.
  24. Ok, so where is $ME defined? I would imagine there's something wrong there. Mind showing us the generated HTML source of those links? Alternatively, try changing $ME to $_SERVER['PHP_SELF']
  25. This doesn't work: $lineplot.$i You could do something like this: ${'lineplot'.$i} Though you might be better off using an array.
×
×
  • 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.