xref: /PHP-5.6/ext/odbc/tests/odbc_exec_001.phpt (revision a5bb3711)
1--TEST--
2odbc_exec(): Basic test
3--SKIPIF--
4<?php include 'skipif.inc'; ?>
5<?php
6	if ("unixODBC" != ODBC_TYPE) {
7		die("skip ODBC_TYPE != unixODBC");
8	}
9?>
10--FILE--
11<?php
12
13include 'config.inc';
14
15$conn = odbc_connect($dsn, $user, $pass);
16
17odbc_exec($conn, 'foo', 'bar');
18odbc_exec($conn, 'foo');
19
20odbc_exec($conn, '', '');
21odbc_exec($conn, '');
22
23odbc_exec($conn, 1, 1);
24odbc_exec($conn, 1);
25
26odbc_exec($conn, NULL, NULL);
27odbc_exec($conn, NULL);
28
29?>
30--EXPECTF--
31Warning: odbc_exec() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d
32
33Warning: odbc_exec(): SQL error: %s in %s on line %d
34
35Warning: odbc_exec() expects parameter 3 to be long, %unicode_string_optional% given in %s on line %d
36
37Warning: odbc_exec(): SQL error: %s in %s on line %d
38
39Warning: odbc_exec(): SQL error: %s in %s on line %d
40
41Warning: odbc_exec(): SQL error: %s in %s on line %d
42
43Warning: odbc_exec(): SQL error: %s in %s on line %d
44
45Warning: odbc_exec(): SQL error: %s in %s on line %d
46