PHP/MySQL | pdo
DELETED
Автор
31 января 2015, в 10:54
Delete
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
DELETED
Автор
31 января 2015, в 10:57
Delete
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
DELETED
Автор
31 января 2015, в 10:59
Delete
Apeccc (31.01.2015 в 10:57)
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
try {
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
$DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$DBH->prepare('DELECT name FROM people')->execute();
}
catch(PDOException $e) {
echo "Ошибка =.=.";
file_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND);
}
JIeTwE (31.01.2015 в 10:59)
Apeccc (31.01.2015 в 10:57)
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
try {
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
$DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$DBH->prepare('DELECT name FROM people')->execute();
}
catch(PDOException $e) {
echo "Ошибка =.=.";
file_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND);
}
Apeccc (31.01.2015 в 10:57)
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
try {
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
$DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$DBH->prepare('DELECT name FROM people')->execute();
}
catch(PDOException $e) {
echo "Ошибка =.=.";
file_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND);
}
Apeccc (31.01.2015 в 10:57)
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
JIeTwE (31.01.2015 в 10:54)
прав.подключение на pdo?
try {
$DBH = new PDO("mssql:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("sybase:host=$host;dbname=$dbname", $user, $pass);
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);
# SQLite
$DBH = new PDO("sqlite:my/database/path/database.db");
}
catch(PDOException $e) {
echo $e->getMessage();
}
Такая база существует, это не ошибка)
DELETED
Автор
31 января 2015, в 11:09
Delete
[J]iK (31.01.2015 в 11:07)
Главное дрова чтлб были для работы с ней
Главное дрова чтлб были для работы с ней
что такое дрова? :D
Стр.: 1, 2