1
vote
0answers
12 views

Using CodeIgniter Iterate and Sum Over Weekly Date Range

I have been working on a site where I need to iterate by weeks from a specific starting date to a specific ending date and sum a column for that range, then compare it and return the highest value. I ...
0
votes
0answers
10 views

Codeigniter using MYSQLI escape string

I am currently updating a section of code that uses mysql currently the escape string is structured like this: $product_name = mysql_real_escape_string(trim($_POST['product_name'])); and works fine. ...
0
votes
1answer
16 views

Codeigniter Active Record SQL syntax error

I have the following Active Record pattern within one of my models : $this->db->get('names'); $this->db->like('name', $name); $this->db->where('ratio >=', 0.75); ...
0
votes
1answer
21 views

How do I perform mysql NOT IN operation in jquery datatables in codeigniter?

I want to do NOT IN operation or subquery on dataTables, but I'm able to configure how to actually perform such operation. Is it even possible to perform such operation? Here is my query : ...
1
vote
2answers
57 views

count database rows using where clues

I have a myql table and a html search form. so according to a user request he can search the database using that html form. i'm using codeigniter and this is the model function i'm using to query ...
0
votes
1answer
60 views

Trying to populate a dropdown menu in codeigniter with mysql data

Im trying to populate a dropdown box on a registraton form in code igniter but i have had not luck below are snippets from my contorller, model, and view. Base is the drop down field. Model ...
0
votes
2answers
27 views

Select only unique values from a column in codeigniter

i have a table like this name|subjects|location ...................... BUET|CSE|Dhaka BUET|EEE|Dhaka RUET|CE |Rajshahi RU |CE |Rajshahi here all the rows are distinct.And if I use ...
0
votes
1answer
40 views

Performances, mysql queries vs php array

I'm working with codeigniter, now i'm doing a php loop (x100), in each loop i do a mysql query, the result is fine, 1 sec. But is it the good way to do it ? i could make a single mysql query and find ...
1
vote
2answers
12 views

code igniter SQL_CALC_FOUND_ROWS

How to get total number of rows for particular query and also limiting the query results to 10 rows. For example. I've a table called sample. It has 400 rows. On running a query like where name = ...
2
votes
2answers
54 views

Creating complex IF, OR, NOT & AND SQL queries (MySQL)

(Apologies if this a duplicate - I have tried searching, but I may not know the right word for what I'm trying to achieve - feel free to correct me!) The Background So I have a PHP based app ...
0
votes
1answer
64 views

JQuery Live Search in codeigniter

I want to make live search using codeigniter and jquery and mysql but when i type something the result's not showing here is my model code : <?php class artikel_model extends CI_Model { ...
6
votes
4answers
1k views

Update Database Field Error CodeIgniter

I am getting the following error message in CodeIgniter 2.1: A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: database/DB_active_rec.php Line Number: ...
1
vote
3answers
81 views

How to select all records with MySQL LIMIT and OFFSET query

Is there any way of writing a MySQL statement using LIMIT and/or OFFSET but still get ALL the result without limiting of offsetting them? (Ex. LIMIT=0 or all or something like that) I know you'd say: ...
0
votes
2answers
16 views

Translate Wilson Score Confidence SQL Code to Codeigniter active record

I can't seem to translate the Wilson Score Confidence SQL code to Codeigniter active record code. Here is the ordinary SQL for the Wilson Score Confidence: SELECT *, ((likes+ 1.9208) / (likes + ...
0
votes
1answer
44 views

SQL, SELECT items which specific date is not booked

I have items list. Every single item may be booked for specific date, eg. 2013-01-03 00:00:00, 2013-06-13 00:00:00 etc. I have to filter items in way that shows available items for choosen date. If ...

1 2 3 4 5 145
15 30 50 per page