SQL-relay PHP module

PHP API



BUILDING

building procedure:

  1. change the directoty to src/api/php in the SQL-relay source distribution
  2. type setup PHP_directory SQL_relay_directory, where:
    PHP_directory - directory of PHP source
    SQL_relay_directory- directory where SQL_relay is installed
  3. type make to build sql_relay.so
To remove all built files type make clean

USING

After building module you can use it by adding module in PHP script: .. dl("sql_relay.so"); and now you can call SQL-relay functions.

The example script:

dl("sql_relay.so"); $s=sqlrc_alloc("adasz",8000,"user1","password1",0,1); $r=sqlrc_sendQuery($s,"select table_name from user_tables"); for ($i=0; $i<sqlrc_rowCount($s); $i++) { printf("%s\n",sqlrc_getFieldByName($s,$i,"table_name")); }

FUNCTIONS


AUTHOR

Adam Kroielnicki
adasz@wp.pl