473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

zend+pdo+db2

Hi there,

i'm not sure, if it is a php or a database problem, but i would
consider it the first.
i'm programming some code with zend_db and pdo to access a db2
database. additionally a want to be able to replace the db2 on the
localhost with mysql (easier to maintain for a developer). This should
be no problem, as long as i stick to ansi-sql...
But now my problem arises:
I initialize my table-classes in zend like this:

class Core_Db_Table_Actions extends Zend_Db_Table_Abstract
{
protected $_name = 'actions';
}

this works fine on mysql but db2 is compaining about the not
defined table "actions". If i write it all uppercase (ACTIONS)
db2 is happy...
So i wonder if it shouldn't be the task of zend/pdo to hide those
differences from the programmer? Or have i overseen or misunderstood
something?

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
Jun 2 '08 #1
3 1606
Christian Welzel wrote:
Hi there,

i'm not sure, if it is a php or a database problem, but i would
consider it the first.
i'm programming some code with zend_db and pdo to access a db2
database. additionally a want to be able to replace the db2 on the
localhost with mysql (easier to maintain for a developer). This should
be no problem, as long as i stick to ansi-sql...
But now my problem arises:
I initialize my table-classes in zend like this:

class Core_Db_Table_Actions extends Zend_Db_Table_Abstract
{
protected $_name = 'actions';
}

this works fine on mysql but db2 is compaining about the not
defined table "actions". If i write it all uppercase (ACTIONS)
db2 is happy...
So i wonder if it shouldn't be the task of zend/pdo to hide those
differences from the programmer? Or have i overseen or misunderstood
something?

Nope. Identifiers in SQL are case sensitive. And if you're running
MySQL on Linux instead of Windows, you'll find the table names are case
sensitive there, also (if you take the defaults).

The non-standard operation here is MySQL not having case sensitive table
names on Windows.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 2 '08 #2
Jerry Stuckle schrieb:
Nope. Identifiers in SQL are case sensitive. And if you're running
MySQL on Linux instead of Windows, you'll find the table names are case
sensitive there, also (if you take the defaults).
Thanks for your advise. I never hit this problem before, because i always
create tables lowercase. But now the mtk from ibm created them in uppercase...
So this confused me a bit.

--
MfG, Christian Welzel aka Gawain@Regenbogen

GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
Jun 2 '08 #3
Christian Welzel wrote:
Jerry Stuckle schrieb:
>Nope. Identifiers in SQL are case sensitive. And if you're running
MySQL on Linux instead of Windows, you'll find the table names are
case sensitive there, also (if you take the defaults).

Thanks for your advise. I never hit this problem before, because i always
create tables lowercase. But now the mtk from ibm created them in
uppercase...
So this confused me a bit.
Yep, it's all a matter of style, just like variable names in PHP. But,
like variable names, case is important.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christian Welzel | last post by:
Hi there, i'm not sure, if it is a php or a database problem, but i would consider it the first. i'm programming some code with zend_db and pdo to access a db2 database. additionally a want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.