Re: [PHP-DB] Re: Unified DB Query function

2002-07-31 Thread Manuel Lemos

Hello,

On 07/25/2002 04:35 PM, Andrew Hill wrote:
  Manual,
 
  Certainly - please help us pinpoint any issues.
 
  Dan Kalowsky has done some great work in resolving lingering ODBC issues
  in PHP, and I help in my way with testing and iODBC support.
 
  I respect the work you have done with Metabase, but it's a fallacy to
  suggest that ODBC is weak - some ODBC drivers are indeed week, but a
  proper driver provides more complete functionality than even native
  drivers, and is often faster.

Andrew you ought to try developing really portable Web applications with 
PHP using ODBC so you can understand better what I am talking.

The real problem is that ODBC was not meant for addressing specifically 
the actual needs of Web development.

The ODBC driver was the most frustrating driver that I developed for 
Metabase. The problem is that ODBC API does not expose enough 
information from the underlying database so Metabase could figure how to 
implement some abstracted features.

For instance, Metabase abstracts sequences. If the underlying database 
supports auto_increment fields, Metabase creates a separate table with a 
single auto_increment field to emulate a sequence. So far, so good. But 
how do I retrieve the last inserted number in a database independent 
way? Is it possible at all with ODBC API? Even if it is possible, I 
can't see support for the in ODBC API PHP functions.

Another issue is selecting specific ranges of result rows. Doing this 
efficiently depends a lot on the underlying database. In MySQL we use 
LIMIT. On MS-SQL I use server side cursors. Other database have special 
keywords that prevent hogging the server or the database connecting 
sending unnecessary query result data.

I know ODBC has several cursor models. Client side cursors are what 
Metabase ODBC uses already, but that is not as efficient as using 
specific database keywords. Even if I can use a server side cursor, how 
can I know with the current ODBC API PHP functions tell if the ODBC 
driver is capable of using such cursors? There doesn't seem to be a way 
to do it.

Another thing are transactions. How do I tell if the underlying ODBC 
driver supports transactions? I know you can know it in C calling the 
ODBC API but there is no support to tell that from PHP.

A major flop of ODBC PHP API are NULLs. How do I tell if a result set 
column has a NULL? It returns an empty string. How do I distinguish 
result set column empty string values from real NULLs? This needs to be 
fixed.

Other than that, there were problems with odbc_gettypeinfo() more than 
once in the same script. Depending when you would free the result set it 
was either crashing PHP or returning an empty result set. I don't know 
if this was fixed since PHP 4.0.6 but the problem existed and prevented 
Metabase ODBC driver to figure how to correctly create tables and using 
correctly certain types of fields like blobs.

There are probably other types of problems, but these are those that I 
remember immediately.

Anyway, so far, it seems that using ODBC with PHP is pretty useless 
especially to write portable database independent applications until 
these problems are addressed. Because of this I will need to develop 
ODBC sub-drivers for Metabase that are aware of database specific 
details that PHP ODBC support is uncapable of providing.

Regards,
Manuel Lemos


  -Original Message-
  From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, July 25, 2002 1:39 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Re: Unified DB Query function
 
  Hello,
 
  On 07/25/2002 02:34 PM, Andrew Hill wrote:
 
 Pierre,
 
 Why not use ODBC functions everywhere?
 
 
  I already told you before. ODBC is very weak API for real database
  abstraction. To make it worse, PHP ODBC API is buggy and not as complete
 
  as it could be.
 
  As the maintainer of PHP ODBC support, if you are willing to do anything
 
  about it, I can help you to pin point the problems that need to be
  addressed. Otherwise it is quite pointless to even consider using ODBC
  in PHP unless it is your really alternative.
 
  Regards,
  Manuel Lemos
 
 
 
 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Virtuoso Universal Server
 
 
 -Original Message-
 From: Pierre-Alain Joye [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 01, 2002 1:01 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Re: Unified DB Query function
 
 On Mon, 01 Jul 2002 14:55:01 -0300
 Manuel Lemos [EMAIL PROTECTED] wrote:
 
 
 
 Hello,
 
 On 07/01/2002 06:46 AM, Casey Allen Shobe wrote:
 
 
 I'm trying to write a unified database query function for an
 
 application I
 
 
 have which currently accesses data from both DB2 and Microsoft SQL
 
 from a
 
 
 Linux server.  I'm using ODBC functions for DB2, and Sybase
 
 functions for
 
 
 Microsoft SQL.
 
 Why do you re-invent the wheeel and don't you use

Re: [PHP-DB] Re: Unified DB Query function

2002-07-25 Thread Manuel Lemos

Hello,

On 07/25/2002 02:34 PM, Andrew Hill wrote:
 Pierre,
 
 Why not use ODBC functions everywhere?

I already told you before. ODBC is very weak API for real database 
abstraction. To make it worse, PHP ODBC API is buggy and not as complete 
as it could be.

As the maintainer of PHP ODBC support, if you are willing to do anything 
about it, I can help you to pin point the problems that need to be 
addressed. Otherwise it is quite pointless to even consider using ODBC 
in PHP unless it is your really alternative.

Regards,
Manuel Lemos


 
 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Virtuoso Universal Server
 
 
 -Original Message-
 From: Pierre-Alain Joye [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, July 01, 2002 1:01 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Re: Unified DB Query function
 
 On Mon, 01 Jul 2002 14:55:01 -0300
 Manuel Lemos [EMAIL PROTECTED] wrote:
 
 
Hello,

On 07/01/2002 06:46 AM, Casey Allen Shobe wrote:

I'm trying to write a unified database query function for an

 application I 
 
have which currently accesses data from both DB2 and Microsoft SQL

 from a 
 
Linux server.  I'm using ODBC functions for DB2, and Sybase

 functions for 
 
Microsoft SQL.

Why do you re-invent the wheeel and don't you use a database
 
 abstraction 
 
package that handles the database differences of you, like for
 
 instance 
 
Metabase:

http://www.phpclasses.org/metabase
 
 Just because diversity rules in our world :).
 
 btw, do you have samples codes using the xDefinition methods in
 metabase ?
 
 
 pa
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Unified DB Query function

2002-07-25 Thread Andrew Hill

Manual,

Certainly - please help us pinpoint any issues.

Dan Kalowsky has done some great work in resolving lingering ODBC issues
in PHP, and I help in my way with testing and iODBC support.

I respect the work you have done with Metabase, but it's a fallacy to
suggest that ODBC is weak - some ODBC drivers are indeed week, but a
proper driver provides more complete functionality than even native
drivers, and is often faster.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Virtuoso Universal Server

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 25, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Unified DB Query function

Hello,

On 07/25/2002 02:34 PM, Andrew Hill wrote:
 Pierre,
 
 Why not use ODBC functions everywhere?

I already told you before. ODBC is very weak API for real database 
abstraction. To make it worse, PHP ODBC API is buggy and not as complete

as it could be.

As the maintainer of PHP ODBC support, if you are willing to do anything

about it, I can help you to pin point the problems that need to be 
addressed. Otherwise it is quite pointless to even consider using ODBC 
in PHP unless it is your really alternative.

Regards,
Manuel Lemos


 
 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Virtuoso Universal Server
 
 
 -Original Message-
 From: Pierre-Alain Joye [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, July 01, 2002 1:01 PM




RE: [PHP-DB] Re: Unified DB Query function,
Andrew Hill

Re: [PHP-DB] Re: Unified DB Query function,
Manuel Lemos

RE: [PHP-DB] Re: Unified DB Query function,
Andrew Hill

[PHP-DB] Pulling the Enum Values from MySQL,
Mark Middleton

Re: [PHP-DB] Pulling the Enum Values from MySQL,
Paul DuBois



Re: [PHP-DB] Re: Unified DB Query function,
Manuel Lemos


















 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  02db01c23412$69095470$[EMAIL PROTECTED]">
  Reply via email to
  
  













RE: [PHP-DB] Re: Unified DB Query function,
Andrew Hill

[PHP-DB] Pulling the Enum Values from MySQL,
Mark Middleton

Re: [PHP-DB] Pulling the Enum Values from MySQL,
Paul DuBois



Re: [PHP-DB] Re: Unified DB Query function,
Manuel Lemos














 
--  
Chronological
--
  

 
  

 
  --  
  Thread 
  --  
  





  
  
  
  
  02db01c23412$69095470$[EMAIL PROTECTED]">
  Reply via email to
  
  










 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "3243237953";
google_color_border = "CE9689";
google_color_bg = ["FF","ECE5DF"];
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







[PHP-DB] Unified DB Query function
Casey Allen Shobe


Re: [PHP-DB] Unified DB Query function
Casey Allen Shobe


Re: [PHP-DB] Unified DB Query function
Alexander


Re: [PHP-DB] Unified DB Query function
Casey Allen Shobe




[PHP-DB] Re: Unified DB Query function
Manuel Lemos


Re: [PHP-DB] Re: Unified DB Query function
Pierre-Alain Joye


Re: [PHP-DB] Re: Unified DB Query function
Manuel Lemos


RE: [PHP-DB] Re: Unified DB Query function
Andrew Hill


Re: [PHP-DB] Re: Unified DB Query function
Manuel Lemos


RE: [PHP-DB] Re: Unified DB Query function
Andrew Hill


[PHP-DB] Pulling the Enum Values from MySQL
Mark Middleton


Re: [PHP-DB] Pulling the Enum Values from MySQL
Paul DuBois




Re: [PHP-DB] Re: Unified DB Query function
Manuel Lemos










Re: [PHP-DB] Re: Unified DB Query function
Casey Allen Shobe


RE: [PHP-DB] Re: Unified DB Query function
Cal Evans


Re: [PHP-DB] Re: Unified DB Query function
Manuel Lemos









 






  
  





Reply via email to



  
  





 
 







[PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Manuel Lemos

Hello,

On 07/01/2002 06:46 AM, Casey Allen Shobe wrote:
 I'm trying to write a unified database query function for an application I 
 have which currently accesses data from both DB2 and Microsoft SQL from a 
 Linux server.  I'm using ODBC functions for DB2, and Sybase functions for 
 Microsoft SQL.

Why do you re-invent the wheeel and don't you use a database abstraction 
package that handles the database differences of you, like for instance 
Metabase:

http://www.phpclasses.org/metabase

-- 

Regards,
Manuel Lemos


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Pierre-Alain Joye

On Mon, 01 Jul 2002 14:55:01 -0300
Manuel Lemos [EMAIL PROTECTED] wrote:

 Hello,
 
 On 07/01/2002 06:46 AM, Casey Allen Shobe wrote:
  I'm trying to write a unified database query function for an application I 
  have which currently accesses data from both DB2 and Microsoft SQL from a 
  Linux server.  I'm using ODBC functions for DB2, and Sybase functions for 
  Microsoft SQL.
 
 Why do you re-invent the wheeel and don't you use a database abstraction 
 package that handles the database differences of you, like for instance 
 Metabase:
 
 http://www.phpclasses.org/metabase
Just because diversity rules in our world :).

btw, do you have samples codes using the xDefinition methods in metabase ?


pa

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Manuel Lemos

Hello,

On 07/01/2002 03:01 PM, Pierre-Alain Joye wrote:
I'm trying to write a unified database query function for an application I 
have which currently accesses data from both DB2 and Microsoft SQL from a 
Linux server.  I'm using ODBC functions for DB2, and Sybase functions for 
Microsoft SQL.

Why do you re-invent the wheeel and don't you use a database abstraction 
package that handles the database differences of you, like for instance 
Metabase:

http://www.phpclasses.org/metabase
 
 Just because diversity rules in our world :).
 
 btw, do you have samples codes using the xDefinition methods in metabase ?

What do you mean by xDefinition methods?


-- 

Regards,
Manuel Lemos


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Casey Allen Shobe

On Monday 01 July 2002 01:55 pm, Manuel Lemos wrote:
 Why do you re-invent the wheeel and don't you use a database abstraction
 package that handles the database differences of you, like for instance
 Metabase.

Because I had never heard of it.  It doesn't appear to have a sybase module 
anyways, and they appear to be separate classes for each database, whereas I 
wanted one for all.  Perhaps however I am misreading the site, but it won't 
let me very far without a username and password.

-- 
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Cal Evans

Casy,

try php.weblogs.com ADODB.  It is a database abstraction layer that supports
Sybase. (Among other db backends.)

HTH,
=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: Casey Allen Shobe [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 3:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Unified DB Query function


On Monday 01 July 2002 01:55 pm, Manuel Lemos wrote:
 Why do you re-invent the wheeel and don't you use a database abstraction
 package that handles the database differences of you, like for instance
 Metabase.

Because I had never heard of it.  It doesn't appear to have a sybase module
anyways, and they appear to be separate classes for each database, whereas I
wanted one for all.  Perhaps however I am misreading the site, but it won't
let me very far without a username and password.

--
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Unified DB Query function

2002-07-01 Thread Manuel Lemos

Hello,

On 07/01/2002 05:03 PM, Casey Allen Shobe wrote:
 On Monday 01 July 2002 01:55 pm, Manuel Lemos wrote:
 
Why do you re-invent the wheeel and don't you use a database abstraction
package that handles the database differences of you, like for instance
Metabase.
 
 
 Because I had never heard of it.  It doesn't appear to have a sybase module 

Now you heard of it.

There is a Sybase driver here awaiting to go through the driver 
conformance tests that verify if Metabase API features work as expected 
with this driver. You know, rigorous quality control so nobody gets 
surprises.

http://groups.yahoo.com/group/metabase-dev/files/beta/


 anyways, and they appear to be separate classes for each database, whereas I 

Actually separate classes for each database is a good idea because you 
only call each function fo one database at a time, so it is not bloated 
as it would be if there was a single class with code for all databases.


 wanted one for all.  Perhaps however I am misreading the site, but it won't 
 let me very far without a username and password.

You just need to subscribe to the site, it is free.

-- 

Regards,
Manuel Lemos


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php