Home >Backend Development >PHP Tutorial >sql addition, deletion, modification PHP MySql addition, deletion, modification and query
mysql_connect() connects to the database
mysql_select_db selects the database
mysql_fetch_assoc() gets the result set
mysql_query() executes the sql statement
Examples are as follows:
$con=@mysql_connect('localhost','root','root');//Connect to the database
mysql_select_db('test',$con);//Select the database
$userInfo=mysql_query("select * from user ",$con);//Create sql statement
echo "
"; echo $row['password']; echo " | ";
Technorati Tags: PHP, Mysql, add, delete, modify and check
The above has introduced sql addition, deletion and modification of PHP MySql addition, deletion and modification, including the content of sql addition, deletion and modification. I hope it will be helpful to friends who are interested in PHP tutorials.