Ankitha Reddy has Published 97 Answers

Which PHP function is used to create a MySQL table?

Ankitha Reddy

Ankitha Reddy

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

PHP uses a mysql_query function to create a MySQL table. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows − Syntax bool mysql_query( sql, connection ); Followings are the parameters used in this function − Sr.No ... Read More

What is the role of filter() method in JavaScript?

Ankitha Reddy

Ankitha Reddy

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

JavaScript array filter() method creates a new array with all elements that pass the test implemented by the provided function. The following are the parameters − callback − Function to test each element of the array. thisObject − Object to use as this when executing callback. You can ... Read More

What does the method getFirst() do in java?

Ankitha Reddy

Ankitha Reddy

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

The getFirst() method of the class java.util.LinkedList returns the first element of the current list. Example Live Demo import java.util.*; public class LinkedListDemo { public static void main(String[] args) { LinkedList list = new LinkedList(); ... Read More

How to write PHP script to delete data from an existing MySQL table?

Ankitha Reddy

Ankitha Reddy

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

We can use the SQL DELETE command with or without the WHERE CLAUSE into the PHP function – mysql_query(). This function will execute the SQL command in a similar way it is executed at the mysql> prompt. To illustrate it we are having the following example − Example In this ... Read More

Relational and comparison operators in C++

Ankitha Reddy

Ankitha Reddy

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

In C Programming, the values keep in 2 variables can be compared using following operators and relation between them will be determined. These operators are called relational operators. Various C++ relational operators available are- Operators Description > Greater than >= Greater than or equal ... Read More

How to use remove(obj), remove(index), and removeAll() methods in Java list collections?

Ankitha Reddy

Ankitha Reddy

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

remove(int index) − Removes the element at position index from the invoking list and returns the deleted element. The resulting list is compacted. That is, the indexes of subsequent elements are decremented by one. removeRange(int fromIndex, int toIndex) − Removes all of the elements whose index is between fromIndex, inclusive ... Read More

How to work with Structs in JavaScript?

Ankitha Reddy

Ankitha Reddy

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

To work with Structs in JavaScript, you can try to run the following code − Example Live Demo <!DOCTYPE html> <html> <body> <script> function displayStruct(str) { ... Read More

How MySQL behaves if I use INTERVAL keyword with an invalid date?

Ankitha Reddy

Ankitha Reddy

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

Actually, the behavior of MySQL depends upon the allow_invalid_dates mode. If this mode is enabled then MySQL will accept the invalid date and it would perform the date arithmetic as it performs with a valid date. Otherwise, if this mode is inactive then it will not accept the invalid date ... Read More

Java String, StringBuffer and StringBuilder Tutorial.

Ankitha Reddy

Ankitha Reddy

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

The String class of the java.lang package represents character strings. All string literals in Java programs, such as "ABC", are implemented as instances of this class. Strings are constant, their values cannot be changed after they are created. The StringBuffer and StringBuilder classes are used when there is a necessity ... Read More

How can we export all the data from MySQL table into a text file?

Ankitha Reddy

Ankitha Reddy

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

It can be done with the help of SELECT … INTO OUTFILE statement. We are illustrating it with the help of the following example − Example Suppose we are having following data from table ‘Student_info’: mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name ... Read More

Advertisements