Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Are you looking at what's being echoed out? What EXACTLY does $grab echo out. (be case sensitive)
  2. I'm talking about in the MySQL table. If posts isn't an integer, if it's a VARCHAR, then it will order alphabetically. i.e: it will put 23 after 20001.
  3. Your code looks fine to me. Column "posts" is an integer right?
  4. When you compare strings it's case sensitive. That means if $grab doesn't have a starting capital B and the rest lower case, then the elseif statement will not be true. I cleaned up your code and inserted some debugging lines for you: echo " grab => " . $grab; elseif ($grab == "Blackjack"){ $check = mysql_query("SELECT * FROM bj WHERE bjowner= '0' AND location='$fetch->location'") or die(mysql_query()); $num_rows = mysql_num_rows($check); if ($num_rows != 0){ if ($fetch->location == $location){ mysql_query("UPDATE bj SET bjowner='$username',bjmaxbet='0',bjearnings='0',bjminbet='0' WHERE location='$fetch->location'") or die(mysql_error()); echo "You got the Blackjack!"; } } }
  5. Ah yes, sorry about that. I always do multi-array loops wrong in my head.
  6. Something like this: foreach($GetAllProductGroupCategoriesResult AS $key) { foreach($key AS $key2) { echo $key2['CategoryName'] . " => " . $key2['CategoryID']; } }
  7. If ober's works then don't worry about it. I guess I misunderstood your question because in your example you selected different columns for different ChanX_Reference that were corresponding to your WHERE clause. I tried to create a dynamic loop that would break out if any of the queries got a return > 0. ober's selected the same column every time, which you said works, which is why I'm confused...
  8. Hehe @Bopo, if corbin and I understood your question correctly, then AVG() is the perfect solution for you.
  9. Let's try and debug. Have you echoed out your variables to ensure they hold the correct/expected values? Your SQL may also be invalid. Change the msyql lines to: mysql_query("UPDATE bj SET bjowner='$username',bjmaxbet='0',bjearni... WHERE location='$fetch->location'") or die(mysql_error()); NOTE - Please use tags when posting code.
  10. Because when you do something like: $arr['test']="hello"; echo $arr['test'][0]; ?> OUTPUT: h It's only echoing out the first letter, it's kind of like the string is an array, with each element being a letter.
  11. Sure it is. You can use the aggregate mysql function, AVG(). Does each record have 5 numbers in it or you just want to average everything(*)?
  12. What exactly are you trying to do? You may want to post some relevant code.
  13. Please use tags, and don't post all of your code like that, only relevant.
  14. Can you mark as [sOLVED] then, and use tags next time.
  15. Maq

    What is MHTML?

    http://en.wikipedia.org/wiki/MHTML
  16. ^--- or that, which is a lot easier
  17. In your echo switch the single quotes and double quotes around. Variables don't interpolate in a single quotes string.
  18. Set a session variable to check if they're logged in.
  19. It was me, I just have that special luck.
  20. Yeah, well it really won't do anything except take an hour away from me being on the computer. I understand the seriousness of the situation, but what's the point of me thinking about this? What can I do? I'm not an engineer.
  21. Do you get any output, errors, or does it just not update?
  22. Can you show us your current code? The code you provided does not do anything. I'm pretty sure I understand what you mean. The ways to sort from the user could differ depending on what they choose from the form page.
  23. @taquitosensei, If he had the artist and song title in separate string variables, then he wouldn't have even asked this question.
  24. What if there is a hyphen in the song title? WorldDrknss, how are these song titles being generated?
  25. Do you have error reporting on? ini_set ("display_errors", "1"); error_reporting(E_ALL); The only other thing I can think of is whitespace issues, which it looks like you don't have any, but if you do the display errors should tell you, good luck.
×
×
  • 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.