Questions tagged [database-abstraction]
85 questions
0
votes
1 answer
Is there a way of using PHP-ActiveRecord as symfony's ORM/abstraction layer?
I just discovered PHP-ActiveRecord not too long ago after struggling for nearly a month to write my own ORM (I'm hard headed like that) and I fell in love with it. I had looked at Doctrine and Propel before but decided to run away due to the sheer…

Logan Bibby
- 1,167
- 1
- 10
- 31
0
votes
2 answers
How can I optimize DAL web2py query?
result = db((db.company.location.belongs(locations)) &
(db.company.emp_id.belongs(employee_ids)) &
(db.company.type.belongs(types))).select()
locations is list of location ids
employee_ids is list of employee ids
types =…

Gaurav Vichare
- 1,143
- 2
- 11
- 26
0
votes
1 answer
Database abstraction layer for Scala
Hello i am searching for a database abstraction layer, which abstracts my SQL Statements/Queries so i can support multiple SQL dialects without having to worry about the right syntax.
I wonder if someone has experience with QueryDSL or SQL Builder…

B. Kemmer
- 1,517
- 1
- 14
- 32
0
votes
1 answer
JDBC and abstraction layer
I want to open access to a database using JDBC protocol, so that many people in the company can access it.
The JDBC connection string would look like jdbc:sqlserver://[serverName[\instanceName][:portNumber].
I'm wondering if there is a way to have a…

FlyingSaucer
- 13
- 4
0
votes
0 answers
Creation of db abstraction layer using php
I am trying to create simple database abstraction layer. I read a lot of articles about Active Record and Table Data Gateway and right now I am very confused.
I think that I understand some theory (small) about them but not how exactly to implement…

Anton_Sh
- 225
- 1
- 7
- 16
0
votes
0 answers
How to Map these Classes into a Relational data model?
I am doing a simple blog project for which I've come up with the following object class structure.
user class (email address, password)
blog_entry class ( title, body, dateposted, state[draft, published] )
comment class ( comment, date posted…

KGA Sampath
- 1
- 2
0
votes
1 answer
Declaring Query Objects in PHP Class Methods
I am in the process of building an object-oriented forms system. I am putting together a User class which contains about eight functions. Each function contains a MySQL query for which an object of the Query class must be instantiated.
Is there any…

Ravioli87
- 795
- 13
- 34
0
votes
1 answer
Fat Free Framework: Can I setup a model to compute a field value before save?
Is there a way for the model to compute a field before save?
I have a schema something like this:
item_id
item_qty
item_price
linetotal
I'm trying to avoid this kind of code in my controller:
$model->linetotal = $f3->get('POST.item_qty') *…

ethanpil
- 2,522
- 2
- 24
- 34
0
votes
2 answers
Using codeigniter Models in another non-codeigniter project
I have 2 projects accessing the same DB. One is with CodeIgniter, the other is a home made mvc framework. I'd like to use the same Model layer.
Is it possible to access Codeigniter Models from another project?

Thithi32
- 51
- 1
- 8
0
votes
1 answer
FuelPHP basics, using Model result in View
I am a little confused using fuelPHP 1.7.
The controller
class Controller_Website extends Controller
{
public function action_index()
{
// http://fuelphp.com/docs/general/views.html
$data = Website::get_results();
…

Klaaz
- 1,590
- 3
- 23
- 46
0
votes
2 answers
Where is my MODEL rule here in CodeIgniter system?
I'm using codeIgniter as my framework to build a very big website. Everything is fine. I use Models to get/send data from/to database. But a question has recently confused me. In getting data from loops throughout the page, I don't use the…

Mostafa Talebi
- 8,825
- 16
- 61
- 105
0
votes
2 answers
Mysqli Make connection in one function and use it for sql queries in other function
I was trying to make a database class similar to what most cms have, so I am making a connection in one function and returning connection object to be used for queries in other functions in class ..

Prince Singh
- 5,023
- 5
- 28
- 32
0
votes
1 answer
getProducts then getVariations for each product and display in table view with Codeigniter
Ok, I'm new to coding. I will try to present this question as clearly as possible.
I am looking to achieve the following table rows.