473,386 Members | 1,766 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,386 software developers and data experts.

Access to different database types

Hello,

i need your help.

I want to implement a php-script where I can access to different
database types as PostSQL, MySQL etc.
Is that possible? Furthermore I want to include an access
authorization which defines the write- or read-access of each user.

I hope this group could help me....I am looking for good ideas.

Thx for your help.

Br,
Scotty

Mar 26 '07 #1
2 1705
sc*********@gmx.de schrieb:
I want to implement a php-script where I can access to different
database types as PostSQL, MySQL etc.
Is that possible? Furthermore I want to include an access
authorization which defines the write- or read-access of each user.
Yes it is possible and has already been solved a couple of times. Don't
waste time on reimplementing this but reside to using one of the
existing solutions like AdoDb or PEAR_DB. Using PDO already makes it
possible to access different DBMS but you have to write your SQL so that
it is accepted by all the DBMS you plan on using. For example, the code

id INTEGER AUTO_INCREMENT

will only work in a CREATE when using MySQL since most other DBMS have
another way of declaring auto-incrementing identifier columns.

Furthermore, you might want to use some ORM solution like Propel or one
of the solutions in the different frameworks depending on the nature of
your projects.

OLLi

--
"What’s a little treason between old friends?"
[Jack, Alias 508]
Mar 26 '07 #2
On Mar 26, 4:10 am, Oliver Grätz <oliver.gra...@gmx.dewrote:
scott.al...@gmx.de schrieb:
I want to implement a php-script where I can access to different
database types as PostSQL, MySQL etc.
Is that possible? Furthermore I want to include an access
authorization which defines the write- or read-access of each user.

Yes it is possible and has already been solved a couple of times. Don't
waste time on reimplementing this but reside to using one of the
existing solutions like AdoDb or PEAR_DB. Using PDO already makes it
possible to access different DBMS but you have to write your SQL so that
it is accepted by all the DBMS you plan on using. For example, the code

id INTEGER AUTO_INCREMENT

will only work in a CREATE when using MySQL since most other DBMS have
another way of declaring auto-incrementing identifier columns.

Furthermore, you might want to use some ORM solution like Propel or one
of the solutions in the different frameworks depending on the nature of
your projects.

OLLi

--
"What's a little treason between old friends?"
[Jack, Alias 508]
Agreed, PDO does have some good cross-database functionality, but, as
stated in it's name, PDO is not really designed to do this. PDO
stands for PHP Data Objects and is designed to give a consistent
interface with databases, so you don't have to learn database-specific
PHP language..in other words, it gives a "data-access" abstraction
layer. What you're looking for is a database abstraction layer, which
really isn't too difficult to understand or implement.
>Furthermore I want to include an access
authorization which defines the write- or read-access of each user.
A simple user manager could solve this.

Mar 26 '07 #3

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

Similar topics

0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
21
by: brink | last post by:
I work in the parts department of a new car dealership. We ar frequently asked by customers for fluid capacities and types of thei vehicles. Unfortunately this information is not in our parts...
42
by: PC Datasheet | last post by:
I have zero experience with using a SQL database for a backend and Access for a frontend. I have some questions: 1. Does an SQL database have tables? 2. How does Access connect to the data in...
3
by: mazubair | last post by:
I am going to develop a Banking Solution for very small branches of a Bank. The branches are standalone and no remote transactions will be made i.e. only the individual branch will be under...
5
by: Seok Bee | last post by:
Dear Experts, I currently trying to use the FileUpload control from asp.net 2.0 to upload files. The uploading of the file I would like to store it in the Access Database. Unfortunately, I've no...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
5
by: Ted | last post by:
I am working on two versions of an application, one of which will be a windows forms application (which will need to be redistributable) and the other will be a web application. I have MS Visual...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.