Category: Database
MYSQL | #1293 – Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP
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
Selenium | How to perform search with Selenium script
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
How to add combobox in editable datagrid using jQuery EasyUI
Following is the code to add Combobox in editable data grid: Index.html: <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″> <thead> <tr> <th field=”Item_number”width=”100″ editor=”{ Type:’combobox’, Options:{url:’get_itemname.php’, valueField:’itemno’, textField:’itemname’ }}”>Item Name</th> <th
Microsoft SQL Server | MySQL LIMIT equivalent in Microsoft SQL Server
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
CakePHP bake: SQLSTATE[42S02]: Base table or view not found
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
Selenium | Mass CSV file generation by fetching data from database
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
MySQL | A short note on database indexes
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
Database Connectivity with Selenium Webdriver
How to connect to Mysql in Selenium script? Step 1: Import Mysql connector (JDBC driver): Download connector from: Find-ur-pal 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
Mysql Workbench | How to copy Remote database into your local machine
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: