[PHP] How to retrieve credit card payment reports from Bambora

First of all, make sure if API access passcode under “administration -> account settings -> order settings” is generated and obtainable. Payment reports are retrieved by transaction dates. So, it should be cross checked with local DB transaction data in order to get one transaction information  out of order number, customer’s name or other information […]

[PHP] How to upload a file to other server using POST method with CURL

For me, it was required to send a uploaded file on application server to web server So, I googled, tested and implemented this solution. Basically, this is not purely my work as usual as. First, make sure CURL is installed on your PHP. Installation might be different according your setup. From Server will have a page like […]

[DB] How to sort non-numeric field numerically in MySQL

It is common to store numeric values on Varchar or non-numeric field for developer’s convenience. However, it can cause a problem when sorting. For example, 10 comes prior to 9 when sorted. Here are three tricks thatcan be found on various websites as below. 1. Casting It is possible to sort while casting non-numeric value […]

[OS] How to enable CUPS Printer Web Interface on Mac

First, try to go to the link as below. [code] http://localhost:631/printers/ [/code] If the link does not work, open terminal and type the command as below. [code] $sudo cupsctl WebInterface=yes [/code] Then, you will be able to see printers on your machine.

[DB] How to count all rows in MySQL query with LIMIT

A SELECT statement may include a LIMIT clause to restrict the number of rows the server returns to the client. In some cases, it is desirable to know how many rows the statement would have returned without the LIMIT, but without running the statement again. To obtain this row count, include an SQL_CALC_FOUND_ROWS option in […]

[DB] How to Disable MySQL Strict Mode

What is Strict Mode? Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. A value can be invalid for several reasons. Why to Disable? If you do not disable the strict mode, you may encounter errors while using the script. How to determine the current global […]