Complete Inserts vs Extended Inserts in phpMyAdmin

Exporting MySQL data from phpMyAdmin can be a challenge, especially when the tables are big. But most of the time, the MySQL dumps become humongous due to the form of the SQLs that are being exported. For example, the standard export would generate SQL along the likes of:

INSERT INTO `table` VALUES(1, ‘Bob’);
INSERT INTO `table` VALUES(2, ‘Brad’);
INSERT INTO `table` VALUES(3, ‘Ben’);

phpMyAdmin offers the option of Complete Inserts, and Extended Inserts. What do they mean?

Complete Inserts generate SQLs that are more readable, by including the table fields in each SQL line:

INSERT INTO `table` (`id`, `name`) VALUES(1, ‘Bob’);
INSERT INTO `table` (`id`, `name`) VALUES(2, ‘Brad’);
INSERT INTO `table` (`id`, `name`) VALUES(3, ‘Ben’);

Extended Inserts provide simplicity – instead of 3 lines (or 3,000), they combine all into one:

INSERT INTO `table` VALUES (1, ‘Bob’), (2, ‘Brad’), (3, ‘Ben’);

To get the best of both worlds – readability and brevity, we can select both options to generate SQLs like such:

INSERT INTO `table` (`id`, `name`) VALUES (1, ‘Bob’), (2, ‘Brad’), (3, ‘Ben’);

Imagine the file size savings! The newer phpMyAdmin versions already have both options checked, so it’s really a no-brainer to use.

Via Scriptalicious

Note: If you use BigDump to import files, you must UNCHECK the Extended Inserts option when exporting.

How To Fix A WordPress 3.0.1 Upgrade Problem

WordPress 3 users may encounter problems with the automatic upgrade feature when upgrading to WordPress 3.0.1. In essence, the process hangs at “Unpacking the update”:

Downloading update from http://wordpress.org/wordpress-3.0.1.zip.

Unpacking the update.

(…and nothing happens!)

The solution that I found was simple – disable all plugins. Then do the upgrade, and re-enable the plugins. WIN!

Importing Blog Posts From Blogspot / Blogger To WordPress 3+

WordPress 3+ users trying to import their blog posts from Blogspot / Blogger recently may be encountering errors along the lines of “HTTP 403 Invalid AuthSub”.

I spent a few hours looking for solutions to no avail, which included the Blogger2Wordpress application. It seemed to work only with XML files under 1MB in size.

Thankfully, there is now a fix to the built-in WordPress importer, and the migration from Blogger to WordPress now works without any problems.

All you have to do is update the “Blogger Importer” plugin to its latest version 0.3. It should be available under the Plugins section.

Downloading and Updating the Apple iOS4 Manually for the iPhone

iPhone users trying to download the latest Apple iOS4 update may encounter certain "3259 The Network Connection Time Out" errors.

I tried about 6 times with no success, each breaking as it reaches to 50MB mark of the 377MB download. Worst of all, the update in iTunes has no "resume" function so every time the connection times out, the download restarts from 0KB all over again!

Thankfully, there’s an option to download and install the iOS4 firmware updates manually, which I managed to do without a hitch. The quickie how-to:

1. Head over to http://ios.e-lite.org, and select the appropriate iOS4 direct download link. It should be a .isfw file.

2. Once downloaded, plug in your iPhone, iPod or iPad to the computer.

iOS4_manual_update

3. Run iTunes, and go to the iPhone screen. While holding the SHIFT key (OPTION for Macs), click on "Update". You will be prompted to select the file you just downloaded.

4. Sit back, relax, and wait!

Tech tip thanks to LiewCF.com.

Hint: The iOS4 is a big file. I use a free download manager software called NetLeech that supports resuming in case the connection dies.

Fixing a 500 Internal Server Error in a Magento Installation

The installation for Magento seems pretty straight forward, but I could not even see the installation page after uploading all the files via FTP into the server. All that was shown was the very helpful error message:

500 Internal Server Error

A quick Google search yielded over 7,000 results, and most are related to the folder / file permissions.

Quite simply, some folder permissions need to be manually set to either 777 or 755. I assumed either would solve the issue, but it didn’t, until I dug into the error log archives and picked out the errors line by line:

[Thu Jun 17 14:37:49 2010] [error] [client 60.48.185.1] SoftException in Application.cpp:256: File “/home/xxx/public_html/demo/magento/downloader/index.php” is writeable by group

In this case, I had set the “index.php” file to a permission level of 777, but it should be 755. Similar errors appeared, and each pointed to the same case. Once the permission levels for all were manually changed, the installation worked like a charm.

Fake Credit Card Numbers

If you develop websites, chances are sooner or later, you will be tasked with implementing online payment systems. An important part of the job requirement is making sure the credit card processing works as it should.

But how do you test the application without having to expose your real credit card details?

Here’s a list of fake credit card numbers; very useful for testing e-commerce and online payment websites. Expiry dates within the next 3 years should work.

An important emphasis by the author:

These are NOT valid credit card numbers. You can’t buy anything with these. They are random numbers that happen to conform to the MOD 10 algorithm. They are a technical resource for programmers – that’s all.

While different card providers (eg Mastercard, Visa & Amex) have varying lengths and prefixes in its numbers, they all use a standard LUHN formula to validate the account number. Learn more here.

Recover Downloaded Flash Video

Have you ever spent hours loading a video online (from WiseVid for example), only to accidentally close the browser, or tripped over the wire and had the whole computer turned itself off? Remember how you would want to kick yourself in the face after?

Those days are over, friend, if this tech tip is of any help.

In most cases, Windows stores downloaded videos in a hidden system folder, accessible from Window Explorer itself.

Finding downloaded videos in the temp folder.

Finding downloaded videos in the temp folder.

1. Type in “%temp%” (without the quotes) into the address bar, and you should see a list of files and folders.

2. Sort by file size. The largest tmp file could most likely be the video file you are looking for.

3. Copy & paste it to your desktop.

4. Rename the file extension from *.tmp to *.flv.

5. You should be able to play the file using your favorite video player. I use VLC Media Player.

    iPhone GUI Template

    iPhone GUI Template

    iPhone GUI Template. Image via Teehan+Lax


    Need a screenshot of the iPhone, or elements of it for your user interface designs?

    Download the iPhone GUI Design Template, available for free as a 9MB PSD file.

    Inserting a Blank Row into MySQL Table

    Assuming that, for a certain reason, you need to insert a blank record into a MySQL table, but using all its default values. No user variables whatsoever. Here’s the SQL:

    INSERT INTO table_name VALUES ();
    

    Flash Player Detection, and Replacing with Images

    It is a common complaint that both the Apple iPad and iPhone devices do not support Flash. Which is quite a surprising decision, as both devices tout “mobile Internet” as its selling point, while Flash is supported on over 99% of all Internet-enabled computers.

    As the situation between Adobe and Apple do not seem to be changing anytime soon, the responsibility thus falls into the trusty hands of good old web developers to make sure that users from those platforms do not get a a broken experience when visiting their websites that employ Flash.

    This was exactly what happened on a website that we built for PushMore, a CrossFit gym that I frequent. The homepage employs a simple slideshow to give visitors a quick look and feel of the gym’s concept; which would otherwise be hard to convey.

    While the site looks fine on computers, iPhone users would see an ugly big white square right where the picture is.

    Browser vs iPhone view

    Thanks to this simple guide by Adobe, we’ve managed to fix the issue by installing some JavaScript codes to detect if a browser supports Flash, and if it doesn’t, to display a static image instead. Useful!


    miketee.net Copyrighted © 2010 | Adimpact presents Revolutionary ...a WordPress Theme by WebRevolutionary.