3 /* Creating table with 3 INT fields, Create index on single field.
4 Create all possible composite indexes.
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 int,f3 int );");
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, "create index idx2 on t1(f1,f2);");
34 $res = odbc_execute($sth);
37 echo "Error in Index creation";
40 echo "\ncreate index idx2 on t1(f1,f2);";
41 echo "\nComposite key Index created\n";
43 $sth = odbc_prepare($conn, "create index idx5 on t1(f1,f2,f3);");
44 $res = odbc_execute($sth);
47 echo "Error in Index creation";
50 echo "\ncreate index idx5 on t1(f1,f2,f3);";
51 echo "\nComposite key Index created\n";
53 $res = odbc_exec($conn, "DROP TABLE t1;");
57 echo "\nError in Drop Table";
60 echo "\nTable Dropped\nTest Passed";