Craige

Canada

May
5
comment MySQL String Function equivalent to PHP ucwords() function
This will screw up on possessive nouns, such as "John's", resulting in "John'S". This can be fixed by adding a c_peek variable for the next character, and checking it right after IF c >= 'a' AND c <= 'z' THEN for a space. e.g. IF NOT (c = 's' && c_peek = ' ') THEN
May
3
awarded Good Answer
Apr
18
awarded Nice Question
Mar
27
awarded Popular Question
Jan
27
awarded Notable Question
Nov
4
awarded Yearling
Nov
4
awarded Yearling
Nov
4
awarded Popular Question
Sep
16
awarded Yearling
Aug
21
awarded Yearling
Aug
14
awarded Self-Learner
Jul
27
awarded Student
Jul
27
answered SSH Reverse Port Forward Bind to address
Jul
27
asked SSH Reverse Port Forward Bind to address
Jul
15
comment PHP global or $GLOBALS
...came from, whether or not it is set, or what other code may be relying on this magic global variable. Globals are hell, and should be avoided for saner coding practices whenever possible (Which is 98% of the time)
Jul
15
comment PHP global or $GLOBALS
@JasonWoof - This answer is suggesting NOT using the global directive. I think you mean the function definition. In either case, in well written code, methods should be short, clear and concise. Sometimes, you just need to modify external values. The key is to make it clear that you are doing that. Passing by reference is the standard way to achieve this.It is more concise than using globals because you know exactly where that value is coming from; it is being passed in by the code that called the method. If you were to use a global, you have no concrete idea as to where that value...
Jul
12
comment PHP global or $GLOBALS
@JasonWoof - How is his code unreadable? This is the standard way to do things.
Jul
8
awarded Nice Question
Jul
5
awarded Notable Question
May
30
awarded Enlightened
1 2 3 4 5