2
votes
1answer
47 views

Codeigniter : How to make the nested selection for related tables

I have two tables in my database one for "LOUNGES" and one for "CITIES". There isn't an explicit connection between them. I mean I haven't put a column "city_id" in the "LOUNGES TABLE". I just take ...
0
votes
1answer
34 views

CodeIgniter DataMapper ORM not running all queries

This has been working great but recently we have come across an issue we have not been able to figure out why it is not behaving the way it should. The problem is that it doesn't run correct queries ...
0
votes
1answer
571 views

How to sum and count together using Codeigniter Datamapper?

I want to do something like this with Codeigniter Wanwizard Datamapper. SELECT COUNT(amount), SUM(amount) FROM mytable Basically I want to extract both the total amount and how many row included in ...
1
vote
0answers
250 views

Codeigniter Datamapper ORM generating wrong query

I'm using Datamapper ORM for the first time together with the array and htmlforms extensions for CRUD. So far both extensions worked well for all my models but today I'm facing a weird problem for one ...
0
votes
1answer
460 views

How to insert into a table join other table using Activerecord in CodeIgniter?

I'm new to CodeIgniter and ORM, I hope you guys can help me with this. The question table: CREATE TABLE `question` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(128) NOT NULL ...
1
vote
2answers
500 views

Codeigniter ORM active_record example generator sql WHERE id ='1' AND ( c1 like '%3%' OR c2 like '%3%' )

ENG: Hi all, Question, with CodeIgniter ORM active_record as I can generate the SQL for example ..? Example generator SQL: ... AND( LIKE ... OR LIKE ...) SELECT id, c1, c2 FORM t1 WHERE id ='1' AND ...