- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4219 Articles for MySQLi
153 Views
The INFORMATION_SCHEMA database has a VIEWS table that contains view metadata i.e. data about views. To illustrate it we are taking the example of a view named ‘Info’.ExampleThe following query will show the metadata of a view named ‘Info’ −mysql> SELECT * from INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'Info' AND TABLE_SCHEMA = 'query'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: query TABLE_NAME: info VIEW_DEFINITION:select`query`.`student_info`.`id`AS`ID`, `query`.`student_info`.`Name` AS `NAME`, `query`.`student_info`.`Subject` AS `SUBJECT`, `query`.` student_info`.`Address` AS `ADDRESS` from `query`.`student_info` CHECK_OPTION: NONE IS_UPDATABLE: YES DEFINER: root@localhost ... Read More
131 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
76 Views
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 Parameter & Description 1 Sql Required - SQL query to create a MySQL table 2 connection Optional - if not specified, then the last opened connection by mysql_connect will be used.
117 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.
85 Views
PHP uses a mysql_query function to delete a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −Syntaxbool mysql_query( sql, connection );Followings are the parameters used in this function −Sr. No.Parameter & Description1RequiredSQL query to delete a MySQL database2Optionalif not specified, then the last opened connection by mysql_connect will be used.
82 Views
PHP uses mysql_query function to create a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −Syntaxbool mysql_query( sql, connection );ExampleFollowings are the parameters used in this function −S. No.Parameter & DescriptionSqlRequired - SQL query to create a MySQL databaseconnectionOptional - if not specified, then the last opened connection by mysql_connect will be used.
190 Views
PHP provides us mysql_close() function with the help of which we can disconnect from the MySQL database anytime. This function takes a single parameter, which is a connection returned by the mysql_connect() function. Its syntax is as follows −Syntaxbool mysql_close ( resource $link_identifier );Here, if a resource is not specified, then the last opened database is closed. This function returns true if it closes the connection successfully otherwise it returns false.