AmitDiwan has Published 10744 Articles

Output only the name of the month instead of the month number in MySQL

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 08:09:12

160 Views

To display only the month number, use DATE_FORMAT() along with STR_TO_DATE(). Let us first create a table:mysql> create table DemoTable1320 -> ( -> MonthName varchar(20) -> ); Query OK, 0 rows affected (0.43 sec)ExampleInsert some records in the table using insert command −mysql> insert into DemoTable1320 values('10/10/2010'); Query OK, 1 ... Read More

MySQL query to count the dates and fetch repeated dates as well

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 08:08:40

215 Views

To display the count, use aggregate function COUNT(*). Let us first create a table −mysql> create table DemoTable1321 -> ( -> ArrivalDatetime timestamp -> ); Query OK, 0 rows affected (0.50 sec)ExampleInsert some records in the table using insert command −mysql> insert into DemoTable1321 values(now()); Query OK, 1 row affected ... Read More

How to search dob in a table, which is in the yyyy-mm-dd structure and compare only with a specific yyyy format (year) in MySQL?

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 08:08:15

149 Views

For this, use MySQL YEAR() as in the below syntax −select * from yourTableName where year(yourColumnName)=’yourYearValue’;Let us first create a table −mysql> create table DemoTable1322 -> ( -> DOB date -> ); Query OK, 0 rows affected (0.55 sec)ExampleInsert some records in the table using insert command −mysql> insert into ... Read More

Anchor Pseudo-classes in CSS

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 07:38:48

1K+ Views

Using CSS pseudo-class selectors, namely, :active, :hover, :link and :visited we can style different states of a link/anchor. For proper functionality, the order of these selectors should be −:link:visited:hover:activeThe syntax of CSS psudo-class property is as follows −a:(pseudo-selector) {    /*declarations*/ }ExampleLet’s see an example to use CSS Anchor Pseudo ... Read More

HTML DOM Video autoplay Property

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:53:31

204 Views

The HTML DOM Video autoplay property returns/sets boolean value corresponding to whether the video will play automatically on page load or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.autoplaySetting autoplay to booleanValuemediaObject.autoplay = booleanValueHere, “boolean value” can be the following −booleanValueDetailstrueIt defines that video will automatically play onpage loadfalseIt ... Read More

HTML DOM Video buffered Property

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:52:43

217 Views

The HTML DOM Video buffered property returns a TimeRanges object containing information about the video’s buffered range length and its start, end position.SyntaxFollowing is the syntax −Returning TimeRanges ObjectmediaObject.bufferedLet us see an example of Video buffered property −Example Live Demo HTML DOM Video buffered    * {   ... Read More

HTML DOM Video canPlayType( ) Method

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:52:09

167 Views

The HTML DOM Video canPlayType() returns a string corresponding to whether the browser can play the specified video type or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsevideoObject.canPlayType(typeAsParameter)Here, the return value can be the following −returnValueDetailsprobablyIt defines that browser mostlikely supports the specified video typemaybeIt defines that browsermight support ... Read More

HTML DOM UiEvent detail Property

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:44:08

64 Views

The HTML DOM UiEvent detail property returns a number corresponding to clicks triggered continuously.NOTE − If ondblclick event is triggered returned value is ‘2’, and always ‘0’ if onmouseover or onmouseout event is triggered.SyntaxFollowing is the syntax −Returning number of clicks triggered continuously −event.detailLet us see an example of Event ... Read More

HTML DOM touchmove Event

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:18:48

401 Views

The HTML DOM touchmove event is triggered when touch is moved across the touch screen.NOTE − This event is only for touch devices.Following is the syntax −Trigger touchmove event in HTML −ontouchmove = "eventFunction()"Trigger touchmove event in JavaScript −eventObject.ontouchmove = eventFunctionNote − We ran Touch event examples on Online HTML ... Read More

HTML DOM touchstart Event

AmitDiwan

AmitDiwan

Updated on 08-Jul-2020 05:18:07

449 Views

The HTML DOM touchstart event is triggered when touch screen is touched.NOTE − This event is only for touch devices.Following is the syntax −Trigger touchstart event in HTML −ontouchstart = "eventFunction()"Trigger touchstart event in JavaScript −eventObject.ontouchstart = eventFunctionNote − We ran Touch event examples on Online HTML Editors accessed on ... Read More

Advertisements