[PHP-DB] newbie : For windows-target of PDO-DB-driver, CrossCompile or native-compile?

2009-08-28 Thread Sanjeev Kumar
Hello,
I need to write PHP-PDO database-driver/extension for a new database.

The clarification I need:
1) Should I take the PHP-source on Windows-vista platform and build natively
the DLL for win.
   Will the VisualStudio9 compile with all PHP-main src & the extension
driver to generate the   target windows DLL (PDO extension).

or

2) should I take PHP-src on Linux platform and use GNU Cross-compiler to
generate DLL. Then transfer the DLL to the target-windowsVista PHP env.

 thanks,
-sanjeev kumar


[PHP-DB] Invalid library (maybe not a PHP library) : Error while loading pdo-ext.

2009-08-31 Thread Sanjeev Kumar
Hello,

On Loading my PDO-interface based extension, PHP gives the error:

"PHP: Startup: Invalid library (maybe not a PHP library) 'php_pdo_xyz.dll in
unknow on line 0 "

I wrote a PDO-based driver, modelling the code on lines of  SQLite driver.
Compiled my driver as dll with VC9.0, added the extension to php.ini. on
running PHP,
I get the above error while loading extension.

To crossCheck my dll: I used DependencyWalker tool to see if I have missed
some Dll,
I find that tools seems to find my Dll fine.
The output list of Dll pdependancies of my driver-Dll looks exactly like
that of php_pdo_sqlite.dll

Please let me know, where could be the potential problem.

thanks,
-sanjeev kumar


[PHP-DB] What's the number scheme for 'colno' for Select call in PDO driver

2009-09-11 Thread Sanjeev Kumar
Hi,

In the implemetation of Pdo-driver (extension) , what's the Sequence/Index
scheme for parameter:  'colno'  ?

This param 'colno' is input in driver calls (of PDO statement) :

int SKEL_stmt_describe_col(pdo_stmt_t *stmt, int colno TSRMLS_DC)

int SKEL_stmt_get_col_data(pdo_stmt_t *stmt, int colno, ...)


e.g If the script has cmds:
Insert into Table test1(col1 int, col2 string, col3 real)
  SELECT  col2,col3 from test1;

The driver would which values for colno ?

-sanjeev