Mchl
Staff Alumni-
Posts
8,466 -
Joined
-
Last visited
Everything posted by Mchl
-
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?
-
Retrieving data from two tables, to view statuses and wallposts as on facebook
Mchl replied to Fenhopi's topic in MySQL Help
Because you have one '(' but none ')' -
IRC - Can't connect to remote server.
Mchl replied to alexi's topic in PHPFreaks.com Website Feedback
Well... we just need to ban CV from irc and mark this topic as solved. -
IRC - Can't connect to remote server.
Mchl replied to alexi's topic in PHPFreaks.com Website Feedback
Thank you -
Censored at PHP Freaks--Don't post about mod_security--shame
Mchl replied to xtian's topic in PHPFreaks.com Website Feedback
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. -
Make sure each application, has it's own session_name
-
You don't. Instead you use their mysqli_ counterparts. See mysqli section in manual and if anything is not clear, ask.
-
So the post count is now visible to all?
-
Can someone please help me with few definition
Mchl replied to xxreenaxx1's topic in PHP Coding Help
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 -
This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=313748.0
-
Maybe there is. What's confusing about it?
-
Right click on project in project explorer, choose 'Properties', select 'Run Configuration' branch, select 'Remote Web Site' from 'Run As' dropbox, configure your connection
-
What part of programming challenges you the most?
Mchl replied to Anti-Moronic's topic in Miscellaneous
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. -
Is php 5.3.3 ignoring display_errors?
Mchl replied to q23p's topic in PHP Installation and Configuration
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. -
http://www.php.net/manual/en/intro.pcre.php
-
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.
-
Show how are you trying to insert it.
-
Is hosted exchange really necessary for email?
Mchl replied to galvin's topic in Other Web Server Software
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. -
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.
-
Security through obscurity? Do not even think of going that way. Such methods give only false sense of security.
-
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)
-
This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=312958.0
-
Count your () carefully.
-
Perhaps you should try learning some basic syntax?