Next time you wonder why your insert into sql statement isn’t working, it might be due to the fact that you’re using a reserved keywords for your table’s column name.
[Read more…]
MySQL: Unique Index Created But Cardanilty Is None Solution
So I’ve created a unique index in a table containing rows of data based on 2 columns (SKU,UPC) but the cardinality of the unique index was showing NONE after it was created. In order to solve that, here’s what I did.
[Read more…]
Web Automation With PHP & Curl & iMacros
I have been doing quite a few web automation work lately and everywhere I look, there’s always cases where curl is involved. It’s such a nice library. If you are trying to speed things up and let some software scripts handle that for you with PHP, then I would recommend you check out curl here. I would also like to recommend this useful book which contains awesome examples of web automation titled “Webbots, Spiders, and Screen Scrapers: A Guide to Developing Internet Agents with PHP/CURL”
[Read more…]
How To Download Files Between Web Servers Using SSH
Here’s a quick tip on how to download files located at someone else’s remote web server onto your web host.
[Read more…]
PHP: How To Get Proper Date From A DateTime Column
Let’s say there’s a datetime column ($dateTimeCol) with the datetime value of “2010-02-16 00:00:00”, how would you get the date so that it can be formated as Feb 16, 2010?
[Read more…]
Linux Hosting Cpanel Scrtips Auto Installers: Fantastico VS Softaculous
I host all my sites on Linux systems with cPanel and my webhost uses Fantastico previously to help with installing popular scripts (ex. drupal, joomla, wordpress, phpbb etc) on my websites. While logging into cPanel today, I noticed that my web host has replaced Fantastico with Softaculous.
[Read more…]
My Favorite Netbeans Shortcut Keys
Netbeans has been my php ide of choice for the last couple of months and here are just some of my personal netbeans shortcut favorites that I would like to share. You are welcomed to list what your favorite shortcuts are.
[Read more…]
How To Use Region in C# and VB.Net
In C#
#Region "Don't Touch This!" ... #EndRegion
In VB.Net
#Region "Don't Touch This!" ... #End Region
PHP Solution for “Can’t use method return value in write context”
I was getting this error while trying to do this in php:
if empty($userSession = $this->Session->read('User')) { //do something; }
The solution to get over this is to define a variable before actually testing for its value, as such.
[Read more…]
CakePHP: How To Add Advanced Tinymce TextArea
Getting Tinymce to work in CakePHP was really easy.
[Read more…]