- 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 1466 Articles for PHP
75 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.
66 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.
177 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.
128 Views
PHP provides mysql_connect() function to open a database connection. This function takes five parameters and returns a MySQL link identifier on success or FALSE on failure. Its syntax is as follows −Syntaxconnection mysql_connect(server, user, passwd, new_link, client_flag);Following table give us the parameters used in the syntax above −Sr.NoParameter & Description1ServerOptional − The host name running the database server. If not specified, then the default value will be localhost:33062UserOptional − The username accessing the database. If not specified, then the default will be the name of the user that owns the server process3PasswdOptional − The password of the user accessing the ... Read More
561 Views
MySQL works very well in combination with various programming languages like PERL, C, C++, JAVA, and PHP. Out of these languages, PHP is the most popular one because of its web application development capabilities.PHP provides various functions to access the MySQL database and to manipulate the data records inside the MySQL database. You would require calling the PHP functions in the same way you call any other PHP function.The PHP functions for use with MySQL have the following general format –mysql_function(value, value, ...);The second part of the function name is specific to the function, usually a word that describes what ... Read More
553 Views
JavaScript CookiesUsing JavaScript cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.PHP CookiesCookies are text files stored on the client computer and they are kept for tracking purpose. PHP transparently supports HTTP cookies.How JavaScript cookies work?Your server sends some data to the visitor's browser in the form of a cookie. The browser may accept the cookie. If it does, it is stored as a plain text record on the visitor's hard drive. Now, when the visitor arrives at another page on your site, the browser ... Read More
9K+ Views
To call a Python file from within a PHP file, you need to call it using the shell_exec function.For exampleThis will call the script. But in your script at the top, you'll need to specify the interpreter as well. So in your py file, add the following line at the top:#!/usr/bin/env pythonAlternatively you can also provide the interpreter when executing the command.For example
To Continue Learning Please Login
Login with Google