IFNULL - MySQL
IFNULL(`field1`, `field2`)
That returns field1 if it’s not null. However, it will return field2 if it is null.
IFNULL(`field1`, `field2`)
That returns field1 if it’s not null. However, it will return field2 if it is null.
I just brought 4 queries from 15 seconds to less than 1 second by adding indexes to the columns in the ON() portion on the join.
Indexes help… A lot.
Set public $responsiveCss = false; to public $responsiveCss = true;
http://mahmudahsan.wordpress.com/2008/08/27/mysql-the-group_concat-function/
This seems like it will be super useful.
If you’re using “group by” and you still want to get data out of the grouped rows, then you can use this to combine multiple rows into a single row.
This was totally not very intuitive. I was expecting something like this:
foreach($array as $sub) {
echo(key($sub));
}
Instead, it’s this:
foreach ($decodedOutput as $key => $value) {
echo $key;
}
grep -rl "search_for_this_string" /var/www
PHPExcel_Shared_Date::ExcelToPHPObject($value)->format("m/d/y")
The suds library is the easiest way I found to consume .NET SOAP web services from Python, with Python acting as the web service client. I first picked it up from Jan Sipke’s tutorial.
Here’s an example of my simple client:
from suds.client import Client
client = Client("http://xxx.xxx.xxx.xxx/API/Info.asmx?WSDL")
client.service.getInfo("05/12/2013", "05/12/2013")
CRUD
An example of a CRUD application would be something that tracks orders in a database. All 4 actions are going to be necessary to track those orders. CRUD: The basic database operations.