1.
CopyCode The Code is as follows: $ Connection = mysql_connect ("localhost", "root", "password"); // connect to and select the Database Server
Mysql_select_db ("test", $ connection );
$ Query = "insert into users (user_name)"; // insert a data
Why do you have mysqli?
Reply to discussion (solution)
New versions of PHP are deprecated Mysql_ series functions, it is obviously recommended to use MYSQLI.
Mysqli is object-oriented, and of course it can be process-orientedObject oriented
$
First of all, you great God, we do not have to worry about the PHP code should not be embedded in the Smarty template such problems, okay? Because I also add the function in other people's code, as long as can solve the problem quickly, what method
Is this the only thing that can happen in the morning?-jquery, Morning-jquery
Hi
Slept well yesterday.
Why do not read the paper in the morning, would rather do this, do not want to seriously read the paper. It feels better to read the paper in the
1. while Loop
In this lesson, we will continue to use PHP and MySQL to write some simple and useful pages. We started to display the data in the database from the database we created yesterday, but it will be slightly improved.
First, we use the
First, mysqli connections are permanent connections, while mysql does not. What does it mean? Mysql will re-open a new process whenever it is used for the second time, while mysql uses only the same process,
First, mysqli connections are permanent
SSH-Server Configuration Guide
I. Introduction to SSH
SSH (Secure Shell) is a Secure communication protocol provided by an application. It can securely access the server through the SSH protocol, because SSH has a mature public key encryption system,
The code is as follows:Copy code Session_start ();$ Con = mysql_connect ('localhost', 'root', 'root') or die ('database connection failed! ');Mysql_query ('set names utf8 ');Mysql_select_db ('guestbook ');$ Pagesize = 10; // The number of
Some commonly used MySQL operation functions, and the MySQL operation is closely related, I believe that the development of PHP's primary enthusiasts will be a great help.
1.mysql_connect--open a link to the MySQL server
Description: The link is
This example for you to share the two kinds of PHP data Access , we can compare, analyze the similarities and differences between the two ways, and finally provide you with a small exercise, the specific contents are as follows
Way One: obsolete,
Mysqli encapsulates some advanced operations, such as transactions, while encapsulating many of the methods available during DB operations.
The most widely used place is the mysqli business.
Like the following example:
Copy Code code as
First page while loop
In this lesson, we'll go further and use PHP and MySQL to write some simple and useful pages. We start with the database we created yesterday and display the data in the library, but we'll touch it a little bit.
First, we use
This article describes the PHP implementation of the MySQL backup recovery method of the volume processing. Share to everyone for your reference. The specific analysis is as follows:
Processing is the grasp of the data to be processed into a small
1.
The code is as follows
Copy Code
$connection =mysql_connect ("localhost", "root", "password"); Connect and select a database servermysql_select_db ("Test", $connection);$query = "INSERT into users (user_name)"; Insert
One, while loop
In this lesson, we'll go further and use PHP and MySQL to write some simple and useful pages. We start with the database we created yesterday and display the data in the library, but we'll touch it a little bit.
First, we use the
This will not involve some knowledge of MySQL database installation, but will summarize yourself and use MySQL's most commonly used MySQL statements as your own learning record and notes. The basic environment for the CentOS 6.5 database is mysql5.6.
mysql_connect () Connection databasemysql_select_db Selecting a DatabaseMYSQL_FETCH_ASSOC () Get result setmysql_query () Execute SQL statementExamples are as follows:[Email protected]_connect (' localhost ', ' root ', ' root ');//Connect to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.