3 /* Creating table with 2 fields(say f1 int, f2 char(10)).
4 Create index idx1 on f1 field. Drop that index.Again create index with same name. It should be Passed.
5 check basic INSERT, SELECT */
7 $conn=odbc_connect('mycsql','root','manager');
10 echo "Connection Failed";
14 $sth = odbc_prepare($conn,"create table t1 (f1 int ,f2 char(10));");
15 $res = odbc_execute($sth);
18 echo "Error in Table Creation";
23 $sth = odbc_prepare($conn, "create index idx1 on t1(f1);");
24 $res = odbc_execute($sth);
27 echo " error in index creation";
30 echo "\ncreate index idx1 on t1(f1);";
31 echo "\nIndex created\n";
33 $sth = odbc_prepare($conn, "drop index idx1;");
34 $res = odbc_execute($sth);
37 odbc_exec($conn, "DROP TABLE t1;");
38 echo "\nError in Drop Index\nTest Failed\n";
41 echo "\ndrop index idx1;";
42 echo "\nIndex idx1 dropped\n";
44 $sth = odbc_prepare($conn, "create index idx1 on t1(f1);");
45 $res = odbc_execute($sth);
48 echo "Error in index Creation";
51 echo "\ncreate index idx1 on t1(f1);";
52 echo "\nIndex created\n";
54 //$sth=odbc_prepare($conn,"DROP TABLE t1");
55 $res = odbc_exec($conn, "DROP TABLE t1;");
58 echo "\nError in Drop Table";
61 echo "\nTable Dropped\nTest Passed";