Saturday, October 21, 2017

Migrate MS Access database (.mdb) to MySQL (.sql) database using MySQL ODBC Connector

Hello coders, this blog post provides information about conversion of MS Access Database to MySQL database. First of all, here is a brief overview of the need to migrate .mdb file to .sql file.

- Microsoft Access is used as Database Management System (DBMS) for Windows Desktop Applications. Now, suppose that you have created a similar application on Web and you want to use same database as used in Windows Application.
- You can not use the database created in Microsoft Access on Web Server as it is. You have the following options for using the same database for your Web Application.
  • Using Microsoft SharePoint – MS Access can be used on SharePoint to build Web Database Applications.
  • Migrating MS Access database to Web based database, i.e, MySQL, MS SQL Server or others. This post discusses about this method.
If the conversion of .mdb file can be done to .sql file, then the .sql can be imported to any Web based database. There are online tools available for this. But this blog post discusses about migration without using online available tools.
Now, we will explain how to migrate .mdb file (MS Access database) to .sql file.

Wednesday, June 29, 2016

Sorting a multidimensional associative array by key's value using usort in PHP

This post explains how a multidimensional associative array in PHP can be sorted by value of one of the associative keys. It can also be described as sorting an array of arrays by the keys of sub-arrays. Let us understand the situation with an example. Suppose there is a PHP array shown in the PHP code below:
<?php
$multi_array = array(array('name' => 'Orange', 'code' => '18plkp', 'value' => 15),
                     array('name' => 'Apple', 'code' => '45jklp', 'value' => 49),
                     array('name' => 'Guava', 'code' => '48pyhp', 'value' => 169)
                    );
var_dump($multi_array);
?>

Thursday, October 31, 2013

How to make a Google Map using javascript?

Today, it is common to use google maps to locate the places. There are mobile applications used in mobiles. On websites, the places are located on google maps. Those google maps are made using Google Maps API provided by Google. Here, we will see how to make a simple google map for a particular location using HTML, javascript and Google Maps API.

Sunday, September 15, 2013

URL data extraction like facebook - Simple script in PHP

When you enter a url, then the main data like title, logo, etc. of the page to which the url takes you, are shown. This is called URL extraction. The best example you can see is facebook. Go to facebook homepage, enter the url in its status box. As soon as you type the url ,it shows you the extracted contents of the page corresponding to the url typed.
Let's write a simple script in PHP to show URL extraction. Mainly it will be css, javascript and html. We will use only file_get_contents(url) function of PHP.
Here the code goes...............

Joomla 3 installation issue on WAMP server version 2.4

A few days back, I installed WAMP 2.4 on Windows 8 (64 bit). Then I started installing Joomla 3 (latest version at that time) on this operating system. Now, the installation got stuck at the database creation. At first look, it looked like that there might be some incompatibility between Joomla 3 and Windows 8. But the actual problem was with WAMP 2.4 as I searched for the solutions.

In fact, the problem was with PHP version 5.4 which comes by default in WAMP 2.4.

So, at first look, the solution might be like this:
  • Download the 2.2 version of Wamp Server 32 bit or 64 bit depending upon your windows. 
  • Install it. Then install Joomla 3 , if will become a piece of cake for you now.
If you don't want to compromise on PHP version, then there is another solution available.
Just try this out.
  • Go to wamp\www\joomla folder\installation\sql\mysql and open joomla.sql file.
  • Find the term "ENGINE=InnoDB" and replace all with "ENGINE=MyIsam".
The reason that this trick works is that MyIsam is more supported and compatible with Joomla.

Hope you will like the post. Thanks for reading it.

Tuesday, September 10, 2013

URL Rewriting A Brief Introduction

Hello everyone,
these days you see many urls on different sites shown as some shortened random text. We may call them shortened urls which are made to function correctly by using URL Rewriting on the server on which the target website is hosted. This is just one example where URL rewriting is used. Many other usages are also there. Let's have a brief introduction of this technique below.

Sunday, September 8, 2013

TinyMCE issue with IE9

This is just a simple post about one of the problems I had while using tinyMCE editor in Internet Explorer.
The issue was actually in the versions above IE8 only, i.e. IE9 and IE10. May be there some compatibility issues between tinyMCE editor and Internet Explorer.
Suppose there is a form having a textarea with tinyMCE controls added to it and a submit button. The form uses post method. When you submit this form with a value in the textarea, then that value is not posted to the action of the form(in IE9, IE10; for other browsers, it works fine). That means, the value of the textarea with tinyMCE controls is not transferred through HTTP POST method in versions above IE8.
So, unless the issuse is fixed in tinyMCE editor or Internet Explorer, we can force the Internet Explorer to behave as its older version.
The simplest thing is to just include this line in your html document(where you are using textarea with tinyMCE controls) after the starting of the head tag.
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

That's it. Well, there are many solutions available for this issue but I think it is the simplest one.

Simple Pagination Script in PHP

Let's do a bit of coding in PHP with mysql as the DBMS. Here, I will present the simplest of code to make a page which shows a fixed number of records on a page with the next and previous links to access the next or previous records.I think you are confused what I am saying.

Let's take an example.
Suppose there is a database named "profile"(Let's say in MYSQL). It has a table named "tbl_comment" which has two fields cid and ctext. Now there is a php file named comment.php which will show the list of comments from the tbl_comment table. As the number of comments in the table increase, we need a system to show them systematically on the screen so that the end-user has not to scroll much to read the comments. There comes the pagination script handy.