This question is locked. New answers and comments are not allowed.
Welcome. I downloaded the BETA version and started with Kendo testing in combination with MySQL.
Even at the start I encountered a problem with the PDO.
Doc: http://php.net/manual/pl/ref.pdo-mysql.php
When trying to connect to a database using receives an error. As it turned out, even though you specify a user name and password PDO is created incorrectly.
If you connect to the database should be developed DataSourceResult :: _construct
Old code:
Valid entry:
Even at the start I encountered a problem with the PDO.
Doc: http://php.net/manual/pl/ref.pdo-mysql.php
if
(
$_SERVER
[
'REQUEST_METHOD'
] ==
'POST'
) {
header(
'Content-Type: application/json'
);
$request
= json_decode(
file_get_contents
(
'php://input'
));
$result
=
new
DataSourceResult(
'mysql:host=localhost;dbname=databasename;charset=utf8'
,
'root'
,
'password'
);
echo
json_encode(
$result
->read(
'acc_adr_Ewid'
,
array
(
'adr_Nazwa'
,
'adr_NazwaPelna'
,
'adr_Ulica'
),
$request
));
exit
;
}
If you connect to the database should be developed DataSourceResult :: _construct
Old code:
function
__construct(
$dsn
) {
$this
->db =
new
PDO(
$dsn
);
}
function
__construct(
$dsn
,
$username
,
$passwd
,
$opt
) {
$this
->db =
new
PDO(
$dsn
,
$username
,
$passwd
,
$opt
);
}