Using PDO constructor to connect database and DSN
$dbms = 'mysql';
$dbname = 'test';
$user = 'root';
$pwd = '123456';
$host = 'localhost';
$dsn = "$dbms:host=$host;dbName=$dbname";
$pdo = new PDO($dsn,$user,$pwd);
echo 'pdo Successfully connected to database';
echo $e->getMessage().'<br> ...
Posted on Mon, 25 May 2020 04:04:46 -0400 by duall
There is a lot of feedback from readers. Please refer to the previous article< Hive is finally waiting, Flink >When Flink is deployed and Hive is integrated, there are some bug s and compatibility problems. Although waiting, it is not available. So I added this article as a sister article.
In the previous article, the author use ...
Posted on Mon, 25 May 2020 03:57:37 -0400 by soccerstar_23
php connects to mysql database
Five steps for PHP to access MYSQL database
1. Connect to MySQL database
Using MySQL_ The connect() function establishes a connection to the MySQL server.
2. Select MySQL database
Using MySQL_ select_ The db() function selects the database of the MySQL database server.
3. Execute SQL statement
Using MySQL in the s ...
Posted on Sun, 24 May 2020 23:44:39 -0400 by qbox
The tests are as follows:
(1) Create two tables and insert data. The sql statement is as follows:
CREATE TABLE `a` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT '',
`grade` int(11) DEFAULT NULL,
`dept` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB CHARSET=utf8mb4
insert into `a` ...
Posted on Sun, 24 May 2020 23:38:25 -0400 by runnee
Verification details of php forms
Posted on Sun, 24 May 2020 22:02:21 -0400 by sgiandhu
We have a general understanding of SqlSugar in the last and last articles, but this is not perfect, because those are theoretical knowledge, unable to describe the actual situation in our engineering development. In this article, I will lead my friends to try to write a template class that can be used in the project.
1. Create a Clie ...
Posted on Sun, 24 May 2020 09:49:26 -0400 by CorfuVBProgrammer
In the last article, we know how to use SqlSugar, but we just know how to use it, as if walking in chains, which obviously does not meet the quality of a qualified programmer. Therefore, in this article, we will dig deep into it and explore the secrets behind it.
1. Fancy mapping
In the actual development, the entity class in the pro ...
Posted on Sat, 23 May 2020 06:04:55 -0400 by Zeon
This article, let's continue the previous installation, explain the basic syntax of Oracle, so that you can operate and master the SQL statement, say nothing more, load the goods!!!!!!
Before we talk about Oracle syntax, let's understand ↓ ↓ ↓ ↓ ↓ ↓
1, The difference between Oracle and mysql:
MySQL: user na ...
Posted on Fri, 22 May 2020 12:38:53 -0400 by Ghost_81st
On the SLS platform, machine learning functions can be used to detect related time sequence exceptions. Specific related functions can be used to detect exceptions, to help users improve the efficiency of patrol inspection and analysis. The specific function list is as follows, and the specific address is as follows: https://help.aliyun.com/doc ...
Posted on Fri, 22 May 2020 06:37:28 -0400 by j.bouwers
ShardingSphere is an ecosystem of open source distributed database middleware solutions comprising three separate products, ShardingSphere-JDBC, ShardingSphere-Proxy and HardingSphere-Sidecar (planned).They all provide standardized data fragmentation, distributed transactions, and database governance capabilities that can be applied to a wide v ...
Posted on Thu, 21 May 2020 22:20:15 -0400 by nikbone