Jump to content

Mchl

Staff Alumni
  • Posts

    8,466
  • Joined

  • Last visited

Everything posted by Mchl

  1. You can gain some performance. by changing datatype to CHAR(32) - will save you a byte or two on every row, which will mean MySQL will be able to load more row into memory. Also make sure you're indexing all 32 characters of hash column. Whether or not the `hash` column is indexed will make no difference. Since we're selecting a single row using a primary key column, MySQL will lookup a PK only. If however there are more columns in this table, but you only need these two AND the table is InnoDB, then an index on `hash` column will help (because it will in fact be a composite index over (`id`,`hash`) and query like SELECT id FROM table WHERE id = ? AND hash = ? will lookup index only. Another thing to consider is to store hashes in binary form (as returned by PHP's md5 function, with second argument set to true). So instead of CHAR(32) you can use BINARY(16) field - 16 bytes per row saved, but you must be a bit more careful with setting your connection encoding. P.S. And I supose you do know, that INT(7) makes no sense?
  2. Well... we just need to ban CV from irc and mark this topic as solved.
  3. Breaking the TOS will get it deleted. Posting in wrong forum will get it moved. I don't see the need for anymore breathing room than that.
  4. Make sure each application, has it's own session_name
  5. Mchl

    mysqli

    You don't. Instead you use their mysqli_ counterparts. See mysqli section in manual and if anything is not clear, ask.
  6. So the post count is now visible to all?
  7. http://www.php.net/manual/en/function.isset.php http://www.php.net/manual/en/reserved.variables.get.php http://www.php.net/manual/en/function.highlight-file.php http://www.php.net/manual/en/language.constants.predefined.php If the url variable 'source' is set display the source if current file
  8. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=313748.0
  9. Maybe there is. What's confusing about it?
  10. Right click on project in project explorer, choose 'Properties', select 'Run Configuration' branch, select 'Remote Web Site' from 'Run As' dropbox, configure your connection
  11. Implementing business rules. You know how it goes. You take the process description from a client, and design a clean and streamlined work process. Then they look at it and add in heaps of exceptional situations that wreak havoc around your code, force you to do ugly things (hardcoding values anyone?) and make you feel dirty at the end of the day.
  12. It's not ignoring this setting, however it can be overwritten in your code. Also check (using phpinfo() ) that the php.ini file you're editing, is the one PHP actually uses.
  13. http://www.php.net/manual/en/intro.pcre.php
  14. Empty string ('') will be cast to 0. You need to explicitly insert NULL. else { $drama_notes_id = 'null'; } And remove quotes around '$drama_notes_id' in second insert query.
  15. Show how are you trying to insert it.
  16. The point is to be able to use Blackberry's internet service to push the emails to the phone (a service that you often get free of charge or at a flat rate). I'm not sure really. My mobile operator let me configure any number of IMAP/POP3 accounts, but I suppose this might depend on your operator.
  17. Is the column set to enable empty values (i.e. it is not defined as NOT NULL)? If yes, then entering NULL value (not the string 'NULL') should work. If not, then what do you expect. You can't have empty values if you defined a column like this.
  18. Security through obscurity? Do not even think of going that way. Such methods give only false sense of security.
  19. You should rather teach them how to use browser's incognito mode and always browse with fingers on Alt-F4 (that's what we all do when browsing non kid-friendly sites at work)
  20. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=312958.0
  21. Perhaps you should try learning some basic syntax?
×
×
  • 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.