Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. I mostly use the first example in my views.
  2. You seem to say peoples db design is always bad? Would you be posting any questions on these forums if you had a great application- and db design? Presumably not, as most projects people are working on have a medium difficulty but mostly pick an over-complicated solution probably due to a limited knowledge of the subject domain.
  3. Neither IMO your db just has a very bad design.
  4. SELECT number, text, reply_to, time, m.date AS main_date, c.date AS comment_date, count(*) AS comments_count FROM main m JOIN comments c ON m.number = c.reply_to GROUP BY m.number ORDER BY c.date DESC
  5. In theory they are the same except that neil's solution will work when cURL is not enabled. @neil I chose the wrong words it should have been "You can use" instead of "You'll need"
  6. You are missing a "; and a ; Try: $query = "SELECT USERNAME FROM site_user WHERE username='" . mysql_real_escape_string($username, $db) . "' AND password = password('" . mysql_real_escape_string($password, $db) . "')"; $result = mysql_query($query, $db);
  7. Apparently I misread your question, you can use $_SERVER['REMOTE_ADDR'] if you are browsing locally as mentioned in my previous post (intranet).
  8. You are over complicating it: companies (id, category_id, segment_id, name, description, website_address) companies_addresses (id, company_id, country_id, address, city, postal_code, province) companies_contacts (id, company_id, job_area_id, title, fname, mname, lname, email_address, phone) companies_destinations (company_id, destination_id) companies_business_codes (company_id, business_code_id) destinations (id, destination) business_codes (id, business_code) jobs_areas (id, job_area) countries (id, country)
  9. STICK TO ONE TOPIC http://www.phpfreaks.com/forums/index.php/topic,295204.0 http://www.phpfreaks.com/forums/index.php/topic,295203.0
  10. I really laughed going through your code a good case example as to why you should 1) properly indent your code 2) adhere to a coding convention. $login_succes = 'Yes'; always executes whether the login was successful or not.
  11. Apparently they use Java as my JVM started to boot
  12. Oh really? http://www.mono-project.org Yes partial solutions for .NET-companies to be finally competitive with companies using Linux and Java, which pay 0 on licensing fees for both the OS and IDE (and it becomes even worse if they develop ASP.NET applications MS charges for that to).
  13. Correct. But you do have an Adjacency List Model (parent, child) and the article discusses that model. A probably better read would be http://www.sqlsummit.com/AdjacencyList.htm that not only explains it but also gives you a better approach.
  14. Nope. Because that would mean a syntax error ?!? They don't. But it's best to write 'em.
  15. Nope. We've all used her (many, many times).
  16. Does not show the local IP-address (unless your surfing on intranet). If your surfing on the internet it will show the IP assigned to you by your ISP. It can also show a made-up IP-address (like 0.0.0.0 equals all IP-addresses on the internet). The point is, you can't.
  17. Thanks, whatever I ate during lunch is now lying on the floor.. Why not just use a function for it? Your application is suffering from viscosity, which means that it's easier to build bridges around problems then to actually solve the problem. The added problem is that you are beyond the point-of-no-return in your application as rethinking your application structure would mean a complete rewrite.
  18. No it doesn't I can just remove all those extra lines and upload any file I want (using FireBug). Disabling JavaScript even does the trick.
  19. function getMask(theWord) { return theWord.toUpperCase().replace(/[A-Z]/, "_"); } function revealMask(theWord, wordMask, letter) { if (!letter) return theWord; var length = theWord.length; for (var i = 0; i < length; ++i) { if (theWord.charAt(i) == letter) { wordMask[i] = letter; } } return wordMask; } Don't use " _ " use CSS instead (letter-spacing) and use a monospaced font. It's funny you create something like this as I have created the same thing but used PHP instead you can have a look at: http://www.mediafire.com/file/wetmhyguem3/hangman.zip I use it mainly for my own pleasure and I don't recommend using it in any production environment
  20. Take a look at http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
  21. I know it was a wiseguy-kinda joke but I'm apparently the only one laughing... again... note-to-self: fix humor
  22. Not to mention that you can't use the function before you made sure the global variable actually contains the required value.
  23. Not from me you won't. These comments mostly come from people using Apple products but in recent news has proven that these so called god-like products don't live up to their made-up reputation: http://www.cultofmac.com/macbook-air-so-hot-it-burns/38182 I'm not so hyped around OS systems, I'll sail if it floats Although my job requires the use of multiple (popular) OS systems for mere browser-testing. In my part of the world 3/4 of the programmer jobs are Java, 1/4 is ASP.NET (probably due to the high license costs) anyway my advice was purely based on deployment options rather then employment although Java, PHP, Ruby & Python make a good skill-set any day. PS I'm not a fan of VB.NET and probably never will be and I will be glad to pass along anyone asking for a VB.NET professional to your office
  24. And your question is..?
  25. SELECT * FROM quotes q, quotes_categories c WHERE q.category_id = c.id AND c.id = $category_id LIMIT 1
×
×
  • 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.