Examples with PDO_4D(Информация о версии неизвестна, возможно, только в SVN) Examples with PDO_4D — Examples PDO_4D This basic example show how to connect, execute a query, read data and disconnect from a 4D SQL server. Пример #1 Basic example with PDO_4D
<?phpРезультат выполнения данного примера:
Array
(
[0] => Array
(
[ID] => A
[0] => A
[VAL] => B
[1] => B
)
[1] => Array
(
[ID] => C
[0] => C
[VAL] => D
[1] => D
)
[2] => Array
(
[ID] => E
[0] => E
[VAL] => F
[1] => F
)
)
This example shows how to execute a query in 4D language, and how to read the result through PDO_4D. Пример #2 Accessing 4D language from pdo_4d Set up a 4D method, called method. Make sure in the method properties that the option Available via SQL is checked. The 4D code is the following. C_TEXTE($0) $0:=Version application(*); The PHP code to use the above 4D method is :
<?phpРезультат выполнения данного примера:
(
[0] => Array
(
[<expression>] => F0011140
[0] => F0011140
)
)
Пример #3 Escaping 4D table names This examples illustrates how to escape characters in a 4D SQL query.
<?phpРезультат выполнения данного примера: [ ]] []] ]][ [[ ]]]] [[[ ]]]]]] TBL ]]]]32[23 |
||