3 /*Testing Querry Memory Free with odbc_free_result() */
5 $conn=odbc_connect('mycsql','root','manager');
8 echo "Connection Failed";
12 $sth = odbc_prepare($conn,"CREATE TABLE t1(f1 INT, f2 CHAR(20),f3 SMALLINT,f4 BIGINT,f5 FLOAT, f6 DOUBLE,f7 DATE, f8 TIMESTAMP );");
13 $res = odbc_execute($sth);
16 echo "Error in Creation";
19 echo "Table Created\n";
21 $sql = 'SELECT f3,f5,f7 FROM t1';
22 $result = odbc_exec($conn, $sql);
23 echo "\nFreeing query Memory\n";
25 $freeing = odbc_free_result($result);
30 echo "Query memory freed\n";
32 $sth=odbc_prepare($conn,"DROP TABLE t1;");
33 $res = odbc_execute($sth);
36 echo "\nError in Drop Table";
39 echo "\nTable Dropped \nTest Passed";