value
PHP Question: Octal Values
Fri, 04/15/2011 - 10:50 | by philipnorton42Question
If I assign and print a value like this:
$a = 012; print $a;
I get back a value of '10', why?
Convert A String To A Date Value In MySQL
Tue, 04/21/2009 - 13:49 | by philipnorton42There are numerous ways to print out dates and times, and many hours of programming are spent in converting dates from one format to another.
To do this in MySQL you use the STR_TO_DATE() function, which has two parameters. The first parameter is the time to be parsed and the second is the format of that time. Here is a simple example that converts one date format to a MySQL formatted date string.
SELECT STR_TO_DATE('[21/Apr/2009:07:14:50 +0100]', '[%d/%b/%Y:%H:%i:%S +0100]');
This outputs 2009-04-21 07:14:50.
Using Custom Properties In Phing
Thu, 01/08/2009 - 12:25 | by philipnorton42Phing allows you to set up certain parameters that can be used throughout the rest of the script. These might be used to define a non standard build directory, or to store database connection details that can be written to the connection file during the build.
Properties are defined using the property element, which you should place at the top of your build.xml file in order to make it easy for other developers to see what is going on. The following example defines a property and the uses the main target to print the property out.