odbc_exec_001.phpt 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. odbc_exec(): Basic test
  3. --EXTENSIONS--
  4. odbc
  5. --SKIPIF--
  6. <?php include 'skipif.inc'; ?>
  7. <?php
  8. if ("unixODBC" != ODBC_TYPE) {
  9. die("skip ODBC_TYPE != unixODBC");
  10. }
  11. ?>
  12. --FILE--
  13. <?php
  14. include 'config.inc';
  15. $conn = odbc_connect($dsn, $user, $pass);
  16. odbc_exec($conn, 'foo', 'bar');
  17. odbc_exec($conn, 'foo');
  18. odbc_exec($conn, '', '');
  19. odbc_exec($conn, '');
  20. odbc_exec($conn, 1, 1);
  21. odbc_exec($conn, 1);
  22. odbc_exec($conn, NULL, NULL);
  23. odbc_exec($conn, NULL);
  24. ?>
  25. --EXPECTF--
  26. Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d
  27. Warning: odbc_exec(): SQL error: %s in %s on line %d
  28. Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d
  29. Warning: odbc_exec(): SQL error: %s in %s on line %d
  30. Warning: odbc_exec(): SQL error: %s in %s on line %d
  31. Warning: odbc_exec(): SQL error: %s in %s on line %d
  32. Warning: odbc_exec(): SQL error: %s in %s on line %d
  33. Warning: odbc_exec(): SQL error: %s in %s on line %d