Categories
MySQL

Mysql update fields with random sentence

Sometimes we need to add demo text in a website for checking whether it working fine or somewhere we test website with demo text. So on this case unwanted text inserted into database and you need to remove it. So, we can update fields with random sentence in this case. For example the fields value […]

Categories
Css Css3

em vs px

The most confusing part of CSS styling is that font-size attribute i.e. how this will show in various resolutions. em: This scalable unit is used in web document media due to scalability and their mobile-device-friendly environment. For instance one em is equal to current font-size i.e. if font-size of the document is 10pt then 1em […]

Categories
Creative blog

Choose the right blog topic

The first thing before writing a blog is choose a blog topic that suitable for you to build a successful blog. So do not make any mistake by choosing a wrong topic. So while creating a blog first ask yourself that “What topic should I choose?” or “What topic I am capable to write?”This is […]

Categories
Css Css3

Knowing !important

Using !important rules can be a dangerous way to style your webpage that usually means you are forcefully doing this, but they exist for some reason. The paragraph will be colored red, even there is a ID selector that has higher priority. So, the this rule overrides all the particular property. An !important rule works […]

Categories
MySQL

MySQL Views

A database view is a virtual table which is defined as a SQL select query with JOIN statement. Same as database table it consists of rows and columns. When any data of a tables changes, the corresponding view reflects that changes as well. Advantages: A database view allows you to simplify complex queries. You do […]

Categories
MySQL

Use DISTINCT to eliminate duplicate rows

In a table there may be data available i.e. duplicate. Each time you querying and get all the duplicate data. Use DISTINCT to avoid it. Suppose in a coountry table there are two same country name the using DISTINCT you will get the only one name for each country. SELECT DISTINCT country_name FROM table_country;

Categories
AngularJS

AngularJS Forms & Validation

Using AngularJS Forms you can collect number of inputs. Form can also validate input data. For any type of invalid input it can throw error for notify user. But note to remember that this is just a client side validation. You need to validate from server side also. Here is a sample code for AngularJS […]

Categories
MySQL

Understanding MySQL LEFT JOIN

MySQL LEFT JOIN allows you to get result set from two or more tables for certain matches. Suppose you have two tables i.e. A and B. So if you join A to B using left join then all rows from the A tables will be displayed with matches a row from the B table. Example […]

Categories
Css Css3

Difference between @import and link

Using both @import and link tag you can include style sheet in a webpage. But there is a difference. For performance “link” has a much better advantage. Example of @import and link: <link href=”style.css” type=”text/css” /> <style type=”text/css”> @import url(“style.css”); </style> As @import allows you to import one style sheet into another but older browsers […]

Categories
MySQL

Referential integrity

It is relational database concept in which multiple tables shares consistent relationship based on the data stored on tables. For example, a school X has 2 tables, a student table, and a student fee table. In the student table we have 2 columns – the student ID and the student name. In the student fee […]