Priya Pallavi has Published 70 Articles

How to return the "time" portion of the Date as a string using the current locale's conventions?

Priya Pallavi

Priya Pallavi

Updated on 23-Jun-2020 08:09:03

55 Views

To return the "time" portion of the Date as a string, using the current locale's conventions, use the toLocaleTimeString() method.The toLocaleTimeString method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is ... Read More

With JavaScript RegExp how to search a string for text that matches regexp?

Priya Pallavi

Priya Pallavi

Updated on 23-Jun-2020 07:53:50

138 Views

To search a string for a text that matches RegExp, use rhe exec() method in JavaScript. If it finds a match, it returns an array of results; otherwise, it returns null.The following is the parameter −string − The string to be searchedExampleYou can try to run the following code to ... Read More

What are the document methods supported by Legacy DOM?

Priya Pallavi

Priya Pallavi

Updated on 23-Jun-2020 07:23:30

53 Views

The following is the list of document methods supported by Legacy DOM −Sr.NoProperty & Description1clear( )Deprecated − Erases the contents of the document and returns nothing.Ex − document.clear( )2close( )Closes a document stream opened with the open( ) method and returns nothing.Ex − document.close( )3open( )Deletes existing document content and ... Read More

What is the difference between functions and methods in JavaScript?

Priya Pallavi

Priya Pallavi

Updated on 23-Jun-2020 05:53:17

2K+ Views

Functions and methods are the same in JavaScript, but a method is a function, which is a property of an object.The following is an example of a function in JavaScript −function functionname(param1, param2){    // code }ExampleThe method is a function associated with an object. The following is an example ... Read More

How can we write PHP script to get the list of MySQL database?

Priya Pallavi

Priya Pallavi

Updated on 22-Jun-2020 14:31:14

901 Views

We can write the following PHP script to get the list of available MySQL databases −Example

How can we display all the records from MySQL table with the help of PHP script?

Priya Pallavi

Priya Pallavi

Updated on 22-Jun-2020 13:52:00

762 Views

To illustrate this we are fetching all the records from a table named ‘Tutorials_tbl’ with the help of PHP script that uses mysql_query() and mysql_fetch_array() function in the following example −

How can we see MySQL temporary tables in the list of tables?

Priya Pallavi

Priya Pallavi

Updated on 22-Jun-2020 13:10:17

152 Views

As we know that we can see the list of tables in a database with the help of SHOW TABLES statement. But MySQL temporary tables are not stored in this list or in other words we can say that we cannot see the temporary tables with the help of SHOW ... Read More

How can create a table having the name like a^b along with same column name?name?

Priya Pallavi

Priya Pallavi

Updated on 22-Jun-2020 08:46:26

52 Views

For creating a table with such kinds of names we must have to use quote character. The quotes can be single or double depends upon ANSI_QUOTES SQL mode. If this mode is disabled then the identifier quote character is the backtick (“`”). Consider the following example in which we created a table ... Read More

How can we use prepared statements in a stored procedure?

Priya Pallavi

Priya Pallavi

Updated on 22-Jun-2020 07:42:46

1K+ Views

If we want to use prepared statements in a stored procedure then it must be written inside the BEGIN and END block. To understand it, we are creating an example with the help of which we can get all the records from a table by passing the name of the ... Read More

CSS3 Multi-Column rule-style Property

Priya Pallavi

Priya Pallavi

Updated on 20-Jun-2020 14:45:47

69 Views

The multi-column rule-style property is used to specify the style rule for the column. You can try to run the following code to implement rule-style property using CSS −ExampleLive Demo                    .multi {             /* Column ... Read More

Advertisements