codeigniter

Codeigniter and preg_replace

I use Codeigniter to create a multilingual website and everything works fine, but when I try to use the "alternative languages helper" by Luis I've got a problem. This helper uses a regular expression to replace the current language with the new one: $new_uri = preg_replace('/^'.$actual_lang.'/', $lang, $uri); The problem is that I ha...

How can I test that the output cache is working properly in CodeIgniter?

Should it still be doing SQL queries in the profiler? ...

Why will Doctrine ORM will not create SQL query for my 1-to-many model??

I know this has to have an easy answer, but I cannot figure it out. After tears, I am hoping someone here can help. Here is my YML model: Identity: columns: id: type: integer(10) primary: true autoincrement: true username: type: string(255) Profile: columns: id: ...

codeigniter view, add, update and delete

Hi, I'm newbie in codeigniter and still learning. Anyone can help for sample in basic view, add, update, delete operation and queries in codeigniter will gladly appreciated. Just a simple one like creating addressbook for newbie. thanks, best regards ...

Codeigniter Activerecord update method refuses to insert NULL value

I'm using Codeigniters Active record library to carry out an update on a column on my DB. Here's the SQL for the table CREATE TABLE `schedules` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `reservation_id` INT(11) NULL DEFAULT NULL, `title` VARCHAR(255) NOT NULL, `description` VARCHAR(512) NULL DEFAULT NULL, `start_date` DATE NOT NULL, `st...

Why do Doctrine model classes generated starting with 'A', 'B' cause a crash, but those starting with 'X' or 'Z' do not.

I'm using Doctrine together with CodeIgniter. I have can't quite figure out the logic of why the generated models from my YaML starting in 'A' crash. For example generating a model from the following YaML will work fine: Pguy: columns: ptext: string(255) Likewise: Zguy: columns: ztext: string(255) will produce models/...

CodeIgniter ActiveRecord class_name

I usually use a php class to create value objects for my database objects. Something like: class UserVO { public $id; public $email; } and I then return this as follows: $data = mysql_query($sql); while ($row = mysql_fetch_object($data, "UserVO")) { $result[] = $row; } return $result; I’m now trying to get to grips w...

Codeigniter URI routing variable encoding

I am using the following routing rule in my codeigniter project's routes.php file: $route['manage/(:any)'] = "manage/item_lookup/$1"; this redirects anything after manage in the url to the item_lookup function as a variable. Everything after the manage bit is a text string from a database which is then urlencoded i.e. the page "some ...

where to keep temporary data?

Hi Guys, I'm doing a system with Codeigniter , this is my first system with CI, and i'm also novice to PHP too. I'm doing this for a hospital, in this i have the following problem junior doctor first check the 1st visit patients and then if he can't handle them he refer them to the senior doctor from registration room some patients ...

Use PHP alternate syntax with WAMP

Is it possible to use PHP alternate syntax (as described in the CodeIgniter user guide), on WAMP? ...

Eclipse doesn't add files to workspace when they are added through windows explorer

Hi everyone, I have recently added the reCaptcha library for CodeIgniter (by copying files from the extracted zip into the application folder). Although the files exist in windows explorer and in the open file dialogue in eclipse, they are not added to the eclipse project view; although the project view's root directory is the applicat...

CodeIgniter Cart ID + Options

I have a situation: I have products that are in a CodeIgniter Cart custom store. Each product has an ID associated with it, but also has options for it (sizes). These sizes all have different prices. (We're talking about photos being sold at different print sizes). Because CI Cart updates, adds and deletes based on the product ID inser...

CodeIgniter controllers being called twice.

It is entirely possible that I've made a huge mistake someplace, but for some reason, my controllers are being called twice. This is breaking DX_Auth's captcha's on Chrome, but somehow, Firefox and IE can handle it. The problem is, every controller is getting called twice milliseconds apart. I used log_message() to print every key/valu...

Multiple jquery Scripts on one page

I am brand new to Jquery and have run into something that if answered will help greatly in the future. I have 2 very simple questions I am using codeigniter, HTML5 and all php pages as well. I have a menu 'aside' with 4-5 sections that I want to be able to close to save space. So I am using 2 simple slideToggle scripts. $("a").click(fu...

uploading PDF files with codeigniter

Hi I'm very new to stackoverflow and codeigniter so I apologize if I'm breaking any rules or etiquette with this question (I did a search of the related questions and didn't see anything that related directly to my question). I'm trying to upload a PDF file, and I'm using the following code (codeigniter version 1.7.2): function tes...

to implement a advanced login functionality help needed

I'm developing a system with codeigniter, php and jquery these days, still in the login form, in my login scenario i have a advanced situation i think. i have different kinds of users in my system,this is a hospital system, first of all there is a person to register people, a person to search old records(files), a person to check eye si...

I am using CodeIgnitor and trying to set a varable based on a return from a query

I am able to use print_r and return this data: Array ( [array] => Array ( [status] => false [message] => The %s subscription code is out of date. ) ) i need to be able to set the elements "status" and "message" to variables. (in this case status = false) Thanks for the help. William ...

codeigniter DMZ problem

hey guys , i posted my problem in ci forum but i didn't got an answer so i wish you can help ; all details are here: http://codeigniter.com/forums/viewthread/164933/ best regards . ...

Codeigniter error: calling method inside a false if

Hi, Anyone know why this method is call EVERY TIME "$this->vagas_model->new_jobcv_entry($db_array);" even when the if was false... tkz in advice if($this->tank_auth->is_logged_in()){ if(!$this->tank_auth->is_company()){ $db_array = array( 'jobs_id' => $jobs_id, 'user_id' => $this->session->userdata('user_id'), 'crea...

what's wrong with dmz library in CI

Hey, i started using the DMZ library and all goes cute expet i’m encoutring a problem : i have three tables : portals : id - title.. pages : id - portal_id - title.. categories : id - portal_id - title .. the relation between them is like that : each page and category has one portal . and each portal have many categories and pages . so...