Select MySQL Database Using PHP Function

seetha
Updated on 22-Jun-2020 13:33:13

250 Views

PHP uses mysql_select_db function to select a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −Syntaxbool mysql_select_db( db_name, connection );Followings are the parameters used in this function:Sr.NoParameter & Description1db_nameRequired - MySQL database name to be selected2connectionOptional - if not specified, then the last opened connection by mysql_connect will be used.

Structure of Unix Operating System

Ricky Barnes
Updated on 22-Jun-2020 13:32:57

18K+ Views

Unix is a multiuser, multitasking operating system that was developed by Bell Laboratories in 1969. In a multiuser system, many users can use the system simultaneously. A multitasking system is capable of doing multiple jobs. Each user interacts with their own shell instance in this type of operating system and can start applications as required.An image that demonstrates the structure of the Unix operating system is −As seen in the image, the main components of the Unix operating system structure are the kernel layer, the shell layer and the application layer.Details about these are given as follows −KernelThe kernel provides ... Read More

Update Values in MySQL View

karthikeya Boyini
Updated on 22-Jun-2020 13:32:30

500 Views

As we know that with the help of UPDATE statement we can update the values in MySQL table and in the similar way we can update the values in MySQL views. The syntax of UPDATE statement would be the same except at the place of table name we have to provide the name of the view. We are taking the data as follows from a view named ‘Info’ to illustrate the above concept −mysql> Select * from Info; +------+---------+------------+ | Id   | Name    | Subject    | +------+---------+------------+ | 101  | YashPal | History    | | 105 ... Read More

Modify MySQL View Definition Without Dropping It

Kumar Varma
Updated on 22-Jun-2020 13:31:43

219 Views

With the help of ALTER VIEW statement, we can modify the definition of MySQL view. In this case, we do not need to drop it. The syntax would be as follows −SyntaxALTER VIEW view_name AS SELECT column1, column2… FROM table WHERE conditions;ExampleTo illustrate it we are modifying the definition of a view named ‘Info’ which have the following data −mysql> Select * from Info; +------+---------+------------+ | Id   | Name    | Subject    | +------+---------+------------+ | 101  | YashPal | History    | | 105  | Gaurav  | Literature | | 125  | Raman   | Computers  | | ... Read More

Mac OS X Structure

Kristi Castro
Updated on 22-Jun-2020 13:31:17

7K+ Views

The Mac OS is a graphical operating system developed by Apple Inc. The tenth version of the Mac OS is the Mac OS X which was launched in 2001.The structure of the Mac OS X includes multiple layers. The base layer is Darwin which is the Unix core of the system. Next layer is the graphics system which contains Quartz, OpenGL and QuickTime. Then is the application layer which has four components, namely Classic, Carbon, Cocoa and Java. The top layer is Aqua, which is the user interface.A diagram that demonstrates the structure of Mac OS X is as follows ... Read More

MySQL Updates in Base Table and Associated Views

Moumita
Updated on 22-Jun-2020 13:30:40

113 Views

Yes, MySQL will update the value, if it is updated in a view, in the base table as well as in its associated views. To illustrate it we are taking the example of table Student_info having the following data −mysql> Select * from student_info; +------+---------+------------+------------+ | id   | Name    | Address    | Subject    | +------+---------+------------+------------+ | 101  | YashPal | Amritsar   | History    | | 105  | Gaurav  | Chandigarh | Literature | | 125  | Raman   | Shimla     | Computers  | | NULL | Ram     | Jhansi   ... Read More

Google Android Architecture

Alex Onsman
Updated on 22-Jun-2020 13:30:37

712 Views

Android is an operating system developed by Google for mobile systems. It is based on the Linux kernel and mainly designed for touchscreen devices such as tablets and smartphones.The Android architecture is divided into four main layers and five sections. This is explained using the given diagram −The details about the different parts of the Android architecture are given as follows −ApplicationsThe android applications are in the top layer of the architecture. They are mainly written in Java and run within individual instances of the Dalvik virtual machine. The main features of the Android applications should be performance and efficiency, ... Read More

Create MySQL Table Using PHP Script

Jennifer Nicholas
Updated on 22-Jun-2020 13:28:25

247 Views

As we know that PHP provides us the function named mysql_query to create a MySQL table. To illustrate this we are using the following example −In this example, we are creating a table named ‘Tutorials_tbl’ with the help of PHP script inExample           Creating MySQL Tables                  

Apple iOS Architecture

Ricky Barnes
Updated on 22-Jun-2020 13:28:14

12K+ Views

The iOS is the operating system created by Apple Inc. for mobile devices. The iOS is used in many of the mobile devices for apple such as iPhone, iPod, iPad etc. The iOS is used a lot and only lags behind Android in terms of popularity.The iOS architecture is layered. It contains an intermediate layer between the applications and the hardware so they do not communicate directly. The lower layers in iOS provide the basic services and the higher layers provide the user interface and sophisticated graphics.The layered architecture of iOS is given as follows −Layers in iOS ArchitectureThe different ... Read More

Get Total Number of Rows Affected by MySQL Query

Prabhas
Updated on 22-Jun-2020 13:27:10

4K+ Views

MySQL ROW_COUNT() can be used to get the total number of rows affected by MySQL query. To illustrate it we are creating a procedure with the help of which we can insert records in a table and it will show us how many rows have been affected.Examplemysql> Delimiter // mysql> CREATE PROCEDURE `query`.`row_cnt` (IN command VarChar(60000))     -> BEGIN     ->    SET @query = command;     ->    PREPARE stmt FROM @query;     ->    EXECUTE stmt;     ->    SELECT ROW_COUNT() AS 'Affected rows';     -> END // Query OK, 0 rows ... Read More

Advertisements