Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Yes I see, excuse me. It hould work, that's some nifty hackery Mad.
  2. That's how it does look like. I think you meant this (changed the while to for loop for testing purposes): Print "</pre> <table border cellpadding="3">"; Print "Url:Link:Clicks:"; for($x=0; $x{ Print ""; Print "".$x. " "; Print "".$x. " "; Print "".$x. ""; } Print "</ta
  3. That will add the values of each field, which I don't think the OP wanted. @OP, to my knowledge you need two queries. Is there a specific reason you want to combine them into 1, rather then consolidation?
  4. Oh sorry. Gizmola provided you with a pretty solid explanation. In case you need further information you can look it up in the manual - mysql_fetch_assoc.
  5. What? :D LMAO! That is the best response ever! Ken, we are all new at some point, and I don't even think he meant it like that...
  6. He said he wants it to be platform independent: @OP: Do you ever open this file? Because you would have to fclose it first.
  7. Ahh yes, but I got the epic win!! Muhahahahaa.
  8. Your question is equivalent to asking, "What's the best programming language for every application?". There's no answer, and it's just not right... If you post a more elaborate and detailed explanation of what you're exactly trying to accomplish, we may be able to recommend a couple different distros that may best suit your needs.
  9. But yours is more elaborate. It handles selecting the correct database, escaping the table name (which isn't necessary) and takes into account if the 'posts' and 'topics' aren't INT fields with the single quotes. Well done
  10. if(count($clientlist) != 0)
  11. What OS is your server on?
  12. Have you checked out the sticky? http://www.phpfreaks.com/forums/index.php/topic,117475.0.html
  13. Like this: UPDATE ibf_forums SET topics = 0, posts = 0
  14. If what you mean is when the '$clientlist' is 0 then don't display the table, then you could do: </pre> <table width="100%" cellpadding="0" align="left" bgcolor="#dddddd"> if(count($clientlist) == 0) { foreach($clientlist as $client) { echo ""; echo "" . $client[2] . ""; echo "" . $client[0] . ""; echo ""; } else { echo ""; echo "Sorry, no clients."; echo ""; } } ?> </ NOTE - Never use short tags, always use '<?php', to increase portability.
  15. Ooops, sorry I thought those were tables when "unread" and "received" were actually fields, my bad. :-X
  16. Hmm that's weird. Be careful, it may just be for a specific case you just tested with or something. But you're welcome, lol.
  17. Can you post the table structure of "unread" and "received"?
  18. Can we see the airline() function? It should return an array.
  19. Yes, you need a JOIN.
  20. What?
  21. What OS?
  22. Please read the documentation and examples in the manual next time, mysql_query. $sql = "SELECT mail FROM users WHERE status='1'"; $result = mysql_query($sql) or die (mysql_error()); while($row = mysql_fetch_assoc($result)) { echo $row['mail'] . " "; }
  23. You should always validate server-side, even if you use JS to validate. Moving to Javascript section.
  24. Just use a simpleXML object to grab whatever is between the country elements.
  25. If I understand correctly and if you know where they currently are in the date range, you could use logic similar to: a = start b = end c = current percent = (c - a) / (b - a) * 100
×
×
  • 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.