Kumar Varma has Published 110 Articles

HTML DOM Input Date autofocus Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

90 Views

The HTML DOM Input Date autofocus property sets/returns whether Input Date is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDateObject.autofocusSetting autofocus to booleanValueinputDateObject.autofocus = booleanValueBoolean ValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value and ... Read More

HTML DOM Input Date form Property

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

63 Views

The Input Date form property returns the reference of enclosing form for input date.SyntaxFollowing is the syntax −Returning reference to the form objectinputDateObject.formExampleLet us see an example of Input Date form property − Live Demo Input Date Form Date Select: Get Form ID   ... Read More

Select column names containing a string in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

986 Views

For this, you can use SHOW COLUMNS command. Following is the syntax. Here, we have set the string using LIKE −SHOW COLUMNS FROM yourTableName LIKE ‘yourStringValue’;Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> FirstName ... Read More

MySQL query to update every alternative row string having same values?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

150 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Subject varchar(100)    -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(Subject) values('C'); Query ... Read More

What is the PHP stripos() equivalent in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

86 Views

The stripos() equivalent in MySQL is INSTR(), which returns the position of the first occurrence of a string in another string. Following is the syntax −select instr(yourColumnName, yourWord) As anyAliasName from yourTableName;Let us first create a table −mysql> create table DemoTable    -> (    -> Title text    -> ... Read More

How to lowercase the entire string keeping the first letter in uppercase with MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

81 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Name varchar(100)    -> ); Query OK, 0 rows affected (1.32 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('JOhn'); Query OK, 1 row affected (0.17 sec) mysql> insert ... Read More

SELECT last entry without using LIMIT in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

981 Views

For this, you can use subquery. Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Name varchar(100)    -> ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command ... Read More

How to extract substring from a sting starting at a particular position in MySQL?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

180 Views

For this, you can use the mid() function. Following is the syntax −select mid(yourColumnName, yourPositionToStart, yourEndValue) as anyAliasName from yourTableName;Let us first create a table −mysql> create table DemoTable    -> (    -> Title text    -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the ... Read More

MySQL query with OR & AND conditions

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

114 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Name varchar(20),    -> Age int    -> ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using insert command −mysql> insert ... Read More

How to get the previous day with MySQL CURDATE()?

Kumar Varma

Kumar Varma

Updated on 30-Jul-2019 22:30:26

236 Views

Let us first get the current date using CURDATE(). The current date is as follows −mysql> select CURDATE(); +------------+ | CURDATE() | +------------+ | 2019-06-09 | +------------+ 1 row in set (0.00 sec)Let us first create a table −mysql> create table DemoTable    -> (    -> Id int ... Read More

Advertisements