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…
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…
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…
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. Product 1 without variationsProduct 2 with variations
jason3w
  • 715
  • 1
  • 7
  • 17
0
votes
1 answer

How to interect database results in codeigniter?

i have an problem. I have two tables: 1 called 'Offers' 1 called 'Networks' In the 'Offers' table i have an field called 'NetworkId' and in my table 'Networks' i have an list of all networks with fild 'Id' and 'Name'. I have an method in my Model…
0
votes
1 answer

Update two models of different databases with single view in yii

I have a view (_form.php) with fields (name,summary) submit button. If I click on submit button, it should update Name field of One model and Summary field of another model.Both this models are of different databases. Can anyone help on this. I…
Rudra
  • 711
  • 7
  • 13
  • 31