European characters like è é å ñ ü ,à, è, ì, ò, ù – À, È, Ì, Ò, Ù, ™, © ,• , ∑, α, β, «, » do not get inserted correctly in MySQL by default. To fix it, we need to change the character set (fixed collection of symbols) and collation (set of rules that determine how data is sorted and compared).
To insert and retrieve european characters change character set to utf Read more…
Suppose we want to have columns created_date and last_modified_time with default timestamp in any table in MySQL/Phpmyadmin.
Let us take an example of Students table.
Create table Students using following query :
CREATE TABLE students(
id INT AUTO_INCREMENT PRIMARY KEY ,
first_name varchar(20) NOT NULL,
last_name varchar(20) NOT NULL Read more…
In this post I will give an example of how to perform search with Selenium script on a webpage. Below is the screenshot of the webpage:
Code to automatically enter a keyword “paint” in the textbox and then click Search button (or enter key) is given below. Go through the Read more…
Following is the code to add Combobox in editable data grid:
<table id=”dg” title=” Combobox in editable datagrid ” style=”width:100%;height:700px”
toolbar=”#toolbar” pagination=”true” rownumbers=”true” fitColumns=”false” singleSelect=”true” autoSave=”true” data-options=”pageSize:50″>
< Read more…
Suppose you want to retrieve values from row from 5 to 10 from a table in SQL server. Since LIMIT keyword does not work in it so we can use any of these 2 alternative methods:
Solution 1 :
SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY name) as row FROM TableName Read more…
While running cake bake command for cakephp 3.0 we got the following error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘tablename .columnname’ doesn’t exist
The culprit was a column with name test_id in one of the tables. As per bake command’s conventions about foreign Read more…
In a project we are working on there are large number of pdf files for which field mapping data is stored in the database. In this project pdf forms are auto filled with data from Salesforce. Which PDF form field is mapped to which corresponding Salesforce object or field is Read more…
Index is used for storing values for a specific column in a table. An index is created on a column of a table and used to speed up search queries.
For Example :
Suppose we have a database table called Users with three columns – User_Name, User_Age, and User_Address. Assume that this Read more…
How to connect to Mysql in Selenium script?
Step 1: Import Mysql connector (JDBC driver):
Download connector from:
Download this jar file and import in Eclipse : MySQL-connector-java-5.1.18-bin.jar
Follow these steps in Eclipse:
Add the downloaded Jar to your Read more…
1. Select Database: Schema Transfer Wizard from the Mysql workbench menu bar. You will see schema transfer wizard on your screen as below:
Click on Start the Wizard option.
2. Connection Selection: Now select your source and destination location to copy database:
If you want to Read more…
In MySQL, we generally perform insert, update, select and delete operations on records of table. Multiple Insert operation can also be easily performed on table.
Take an example of Employees table with fields:
Multiple records can be inserted in Employees table in a single query using following MySQL query :
INSERT Read more…
MySql 5.5 is the default version for Ubuntu 14.04
Steps to Upgrade the mysql-server
If you have existing database in Mysql 5.5. It should be migrated automatically.
Take the backup of existing databases:
mysql> mysqldump –lock-all-tables -u root -p -all-databases > backup Read more…
In simple pick list we can select only one value but in multi pick list we can select one or more values.
Scenario: We had to multi pick list data type field
Fields that we wanted to select :
Case 1 : Check if Read more…
When you are building a web-based multi/single tenant system or a desktop system which has a database at its backend to maintain records, keeping the history of records proves to be very useful in the long run from information and security perspectives. History of records means keeping track Read more…
How to use SimpleSAMLPhp as a Service Provider for authenticating users? Some Basic steps to start using simplesamlphp.
1. Download stable version of SimpleSAMLphp from this link:
2. Go to the directory or your workspace where you want to install simpleSAMLphp, extract the zip file. Give Read more…
Follow steps below to install Postgresql 9.4 (instead of 9.3 for which sources are added by default in Ubuntu 14.04):
1. Remove the previous PostgreSQL Version:
*Make sure that you firstly backup your databases.
$ sudo apt-get –purge remove postgresql-*
2. Add Repository:
$ sudo add Read more…
You may face this exception while trying to insert data in a mysql table using hibernate:
java.sql.SQLException: Data truncated for column date at row 1
While there can be different reasons of this problem, in our case it was occurring because by mistake we were trying to insert Read more…
Whenever there is a change in the database whether we are altering database structure or adding/updating data inside database most of the times we create a script file and run it manually. We can automate this process using Maven.
Solution: Maven provides a plugin called flyway-maven-plugin to Read more…
Sometimes, we need to check when was the data last accessed. In MySQL, we had taken a field last_modified_time as timestamp datatype in a table, which was set to CURRENT_TIMESTAMP by DEFAULT.
When a new record was inserted, it automatically updated the field and set the current datetime into this Read more…
While working in eclipse, we faced a problem in which Ctrl+click was not redirecting to the parent function or class.
Solution: To solve this problem, we followed the below steps :
1. Exit Eclipse
2. Go to Workspace
3. Open .metadata folder
4. Open .plugins folder
5. Search for folder Read more…