Hello readers if you want to show a live clock on your web page then you can use the javascript to make it.
So lets start with html page. Create blank HTML page name is clock.html, And it's code will go like this:-
<html>
<head>...
Research used to Searches for records based on the args search domain.
args -- A search domain. Use an empty list to match all records.
offset (int) -- number of results to ignore (default: none)
limit (int) -- ...
Crud used to creates a new record for the model.
The new record is initialized using the values from vals and if necessary those from default_get()..
browse([ids]) records:
Returns a recordset for the ids provided as parameter ...
Model reference is used with main super-class for regular database-persisted OpenERP models.
OpenERP models are created by inheriting from this class. For example you can see below code.
class user(Model):
...
openerp.oepetstore = funct...
Hello Reader's if you want to change css of any div or section or iframe with just a single click then javascript offers you to do this in real time.
Lets see how to change background color of an ifram using just a single click
<iframe src...
Method decorators is most important part of the Odoo, it method decorators provides the elements for managing two different API styles, which is "traditional" and "record" styles.
In the "traditional" style, parameters like the database cursor, ...
Hello Reader's if you want to get all of the HTML code of any website then you use the function as below:-
The first way is by using PHP in built function url fopen, and its code will go like this:-
$ShowHTML = file_get_contents('http://fin...
Hello Readers,
Here we are talking about jquery get() method in this post. It load data from the server using a HTTP GET request. It Send an HTTP GET request to a page and get a response.
Syntax: $.get( url, [data], [callback], [typ...
Hello Reader's you want to generate the 8 digit password with random characters (lower case, upper case and number), Then this function will work for you.
Lets see how genrate the password :-
$ASCIRangeFrom = 48;
$ASCITo = 122;
$MakeRan...
Hello Reader's if you need to make validation of credit GivenCard using PHP then is blog will be helpful to you.
This is only making the validation on user side you should better use seconder validation on payment gate way also.
So the code lib...
Hello Reader's if you are looking for making the function which detect if a given date is weekend or not then this code will help you. This is a PHP function which will use the date as a input param and will print if its weekend or not.
So the ...
Hello Readers,
Jquery each() method is used to run for each matched element.It is used to loop through each element of the target jQuery object.
Synyax: $(selector).each(function(index,element))
Example:
<!DOCTYPE ht...
Hello Readers,
jQuery data method is usually used to set and get data functionality.
Attach data to a HTML tag(like div or span) element, then retrieve the data.
The jQuery data() method attaches data to, or gets data from, selecte...
Whenever we create a form, we always have a requirement to put validation for empty fields on some input fields on form submit. For this we use onSubmit attribute of the form, inside which we can define a function that will have validations.
E...
Hello Readers,
Usually, we need to add css property in HTML tag using Javascript.
Here I am describing different kinds of examples to adding style property using Javascript
1.) If you want to add single css property using Jav...
Sometimes we need to check if a particular string exists in an array or not, we can do this by using inArray() method of jQuery very easily.
Example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"&g...
Hello Reader's!
If you are looking for code that make your plain MyStringPlainText urls and emails into anchor format then you can use the code function as below:-
<?
function SetTheAnchor($MyStringPlainText)
{
$MyStringPlainT...
Sometimes we need to find table list present in a database so that we can identify which table we have to create and which one not.
To work in a particular database we need to use the below statement first:
use database_name;
Example:
...
Sometimes we need to check the CREATE TABLE syntax for already created table in the database. When we need to check what kind of columns and what datatype a column has in a table then we require the CREATE TABLE syntax for that table.
Syntax
...
Hello Readers if you getting in codition where you have to find the current file name then this blog is very helpful to you.
Suppose you are making user redirect only when he is in account.php then you just have to fine the file name.
<?p...
To create a table in MySQL, we use the CREATE TABLE statement. A table is a combination of row and columns.
CREATE TABLE Syntax
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
....
);
In the a...
Hello Reader's if you want to get the details about the vedio from your local server then you can use the code liberary as below:-
$ffmpeg_path = 'ffmpeg'; //or: /usr/bin/ffmpeg - depends on your installation
$vid = 'PATH/TO/VIDEO'; //Rep...
Hello Reader's, If you want to run PHP code when user click any selected anchor tag then you can use the Jquery for this. Lets see how you can run this code.
First you have to write the onlclick action on the anchor tag like this:-
<a hr...
To create a database in MySQL, we use the CREATE DATABASE statement.
CREATE DATABASE Syntax
CREATE DATABASE database_name;
CREATE DATABASE Example
The below statement will create a database named "demo":
CREATE DATABASE demo;
...
Sometimes we need to filter records based on some conditions, for that we use the AND & OR operators in MySQL.
AND operator - We use AND operator if we require both conditions in a query means the AND operator displays a record only if bot...
In MySQL, the LIMIT Clause is used to return the specified number of records means by using LIMIT we can specify how many records we want to return from a table..
The LIMIT Clause is useful when, we want to select some records from a table whi...
Sometimes we need to find the last inserted record into table. We can do this by using ORDER by and LIMIT.
Syntax:
SELECT *
FROM table_name
ORDER by id DESC
LIMIT 1;
Example: Suppose we have a table named "tickit" and we want to fi...
In MySQL, aliases are used to give temporarily name to a table or a column. When we write a query we use Aliases to make column name more readable.
Alias Syntax for Columns
SELECT column_name AS alias_name
FROM table_name;
Alias Synta...
Hello Reader's if you need to develop the todo section in your website where user can create the lists and mark then when they are complete. Then Javascript is the best option for you.
Lets see it's working code as below:-
The html file will ...
Hello Reader's if you are making the resposive website then you can make login and signup in same desing template.
Then you just have to create a front page in html and use the following code:-
<link href="//maxcdn.bootstrapcdn.com/font-...
Hello Reader's if you are making the website and you want to create a switch which convert thumb view into listing and listing view in thumb view then you take the help from the code as below:-
Here is the html page and code will go like this:...
Hello Reader's if you want to make realtime search listing from text box then here you can learn how to do it.
This code is driven by Javascript. The listing will appear from another page and quick search will works on from page.
So the html co...
Hello Reader's if you want to build light process that update the shopping cart then you can see how to make the code.
Lets start with the html page for shoping cart
<form ng-app ng-controller="OrderFormController">
<h1>Servi...
Hello Reader's if you want to edit any value from db in the webpage without any text box or form, Then choosing the Angular JS will be the best option
Lets see the example
For this lets start with the html page. The code for this page will go...
Hello Reader's if you want to show user the menu which he selects then you can use the code below. This code is written in Angular JS
<div id="main" ng-app>
<!-- The navigation menu will get the value of the "active" vari...
Hello Reader's if you are new Angular JS and you want make dynamic title by it then this blog very helpful to your.
By using the title as dynamic you will be free from all the pages with their title, You just need to set it at one place then all...
In MySQL, the LIKE operator is used to search for a specified pattern for a column in a WHERE clause .
LIKE Syntax
SELECT column_name
FROM table_name
WHERE column_name LIKE pattern;
We have a table "employee" as below:
employe...
In MySQL, the UPDATE statement is used to update existing records in a table.
UPDATE Syntax
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
In the above syntax, WHERE clause specifies which row o...
In MySQL, the IN operator is used to allow us specify multiple values in a WHERE clause.
IN Operator Syntax
SELECT column_name
FROM table_name
WHERE column_name IN (value1,value2,...);
We have a table "employee" as below:
empl...
In MySQL, the BETWEEN operator is used to select values (values can be numbers, text, or dates) from a column within a specified range.
BETWEEN Syntax
SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;
...
In MySQL, the ORDER by keyword is used to get records from a table in sorted order. The ORDER BY keyword can use one or more columns to sort the result-set.
We can sort the records in both ascending and descending order.By default, ORDER by ke...
In MySQL, the WHERE clause is used to filter records from a table. The WHERE clause is used to get the records that match the specified criteria in that.
WHERE Clause Syntax
SELECT column_name,column_name
FROM table_name
WHERE column_name...
In MySQL, the SELECT DISTINCT statement is used to return only distinct values means if in a table, a column has duplicate values then SELECT DISTINCT statement will be used to get different values.
SELECT DISTINCT Syntax
SELECT DISTINCT co...
In MySQL, The SELECT statement is used to select data from a table.
SELECT Syntax
SELECT column_name,column_name
FROM table_name;
and to select all records
SELECT * FROM table_name;
We have a table "employee" as below:
...
The GROUP by statement is used with the aggregate functions to group the result by one or more columns.
GROUP by Syntax
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP by column_...
The HAVING clause is used with aggregate functions as the WHERE clause can not be used with them.
HAVING Syntax
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HA...
In SQL, FORMAT() function is used to format a column value means how a field will to be displayed.
FORMAT() Syntax
SELECT FORMAT(column_name,format) FROM table_name;
In the above syntax parameters are as below:
Parameter Descri...
In SQL, NOW() function is used to return the current system date and time.
NOW() Syntax
SELECT NOW() FROM table_name;
We have a table "employee" as below:
employee
id first_name last_name salary
........
In MySQL, LEN() function is used to return the length of the value in a column (text field) in a table.
LEN() Syntax
SELECT LEN(column_name) FROM table_name;
We have a table "employee" as below:
employee
id first_name ...