windows client library changes
[csql.git] / examples / php / README
blobac1858ee50cf1181357ba45dc4d6466ef6ce3b3d
1 ----------------------------------README---------------------------------------
2 This contains an example program that demonstates usage of php interface.
4 What it does?
5 -------------
6 It creates table T1 with two fields f1 integer and f2 string.
7 Inserts 2 rows into the table t1.
8 Updates 1 row 
9 Deletes 1 row
10 Select rows 
11 Drop the table
13 Setting Unix ODBC Configuration
14 -------------------------------
15 Put the following configuration in ~/.odbc.ini file
17 [mycsql]
18 Driver       = /home/nihar/csql/install/lib/libcsqlodbc.so
19 Description  = Connector/ODBC Driver DSN
20 SERVER       = localhost
21 PORT         = 5678
22 USER         =
23 Password     =
24 Database     =
25 OPTION       = 16
26 SOCKET       =
29 After Setting the above Execute following
30 $ cd /home/nihar/csql
31 $ . ./setupenv.ksh
32 $ isql mycsql root manager
34 The above isql command should work properly before running php program
36 How to run
37 ----------
39 1. Set the necessary enviroment variables using the setup script
40    under the csql root directory
41         $. ./setupenv.ksh
43 2. Run the class file created by make
44         $ php phpexample.php
47 Output of example:
48 ------------------
49 <html>
50 <body>
51 /*Create table and test all DML Operation on the table */
52 Table Created
53 Record Inserted
54 Record Inserted
55 select executed
56 <table><tr><th>ROLL</th><th>NAME</th></tr>
57 fetch started
58 <tr><td>12</td><td>Lakshye</td></tr>
59 <tr><td>13</td><td>CSQL</td></tr>
60 </table>
61 Record Updated
62 <tr><td>12</td><td>TWELVE</td></tr>
63 <tr><td>13</td><td>CSQL</td></tr>
64 </table>
65 Record Deleted
66 <tr><td>12</td><td>TWELVE</td></tr>
67 </table>
68 Table Dropped 
69 Test Passed</body>
70 </html>