codeigniter

Getting CodeIgniter Active Record's current SQL code

for example, i want to convert this; $this->db->get('table'); to this; 'SELECT * FROM table' is there any function for this? i searched on the user guide of CI but didnt find any solution. ...

MYSQL REGEXP/RLIKE Advice?

I have a table called "scholarships" that has a field named "majors" which contains comma separated major names for the majors the scholarship is related too. Let's say the field could contain one (or more separated by commas) of the following: business, agribusiness, business administration, international business. If someone is searc...

Use Eclipse PDT (or Mylyn) drilldown, without the clutter

Hi everyone, I am becoming a frequent user of eclipse, and I like it. However I find myself wondering: Is there a way I can use eclipse drill-down and then hide everything in enclosing folders except the folder that I'm drilling into? (kind of how Mylyn filters stuff, but without me having to build a context) I would like to do this,...

jquery + table row edit - String problem

Hello, I've one problem with editing a row... I wanted to use a button to enter edit mode in the table (generated from php array (data taken from mysql)) I have two rows for each data: <tr class="dataline"> <td><?=$row->id; ?></td> <td><?=$row->pl>0 ? '<div id="gain">' . $row->...

Why would anyone use Kohana over Codeigniter

Possible Duplicate: Kohana or CodeIgniter? I have been using PHP for about a year now without a framework and I am ready to dive into one. I have been reading different sites about good frameworks and there seems to be a consensus that these two frameworks are the best ones. After doing some more reading and even on this site...

Codeigniter / mod_rewrite: does not rewrite root folder because it is a folder.

Hey guys, using CodeIgniter I have the following problem on one specific webhost (locally and on my personal host it works just fine). I have a class function which redirects if the URL does not include a language parameter or a link. So if it is /, /home, /de/, etc. it redirects to /de/home. It works just fine if I request /folder/de...

Codeigniter object in session?

Hey guys, I'm starting out with CI and there's something I don't understand. I'm writing this login page and I'd like to add the users object to the session. How do I do that? The user object comes from my user model.. For a new instance I write: $this->load->model('user_model', 'user'); but this won't work: $this->session->set_userd...

How can you get eclipse code complete for CI when using &get_instance() ?

Hi everyone, I'm currently using Eclipse PDT and CodeIgniter, is it possible to get code-completion for the sessions library like so: $CI = &get_instance(); $CI->session->se (No auto-completion here.) Also, is there some sort of plug-in (or just a method) that would allow eclipse to do this for all my CodeIgniter libraries. Note: ...

Codeigniter - Form validation converting post variables from Array to "Array" string

I am building an HTML form with a set of checkboxes for selecting multiple categories using this format: <input type="checkbox" name="category[]" /> So, when I post and print_r($_POST) to view the variable and values I get: Array ( [27] => on [28] => on [29] => on ) Once I run $this->form_validation->run(); the catego...

Can I get Eclipse to autocomplete load-> instead of just load?

I am using CodeIgniter and Eclipse PDT; is it possible to get eclipse to autocomplete loa as load-> instead of load? Similair to how you get $this-> automatically. Thanks, Lemiant ...

Anybody know about a good CodeIgniter reCaptcha tutorial

Hi everyone, I am using CodeIgniter and reCaptcha, but I'm not sure how to properly use the recaptcha library. In the demo, no matter what I type in I get the success message. So that leads to my question: Does anybody know of a good CodeIgniter reCaptcha library tutorial Thanks, Lemiant ...

How to handle exceptions on Doctrine 2 validation

I'm new to Doctrine 2 (and exceptions in PHP, really), but am trying to come up with a robust validation engine on Doctrine 2 (on top of CodeIgniter), following this page. Right now I'm wondering where I would define the ValidateException class, and how to 'try' doing a save (persist?) on my entity (from a controller, library, etc). I'...

How do I get CodeIgniter to create new folders?

I have a user system where, when you register for an account, it's supposed to automatically create a new folder for you. I've placed something along the lines of mkdir('./upload/' . $this->session->userdata('id'), 0, true) in my Register controller but to no avail. Does anybody know how to get it to work? ...

CodeIgniter/PHP Active Record won't increment an integer

Hi folks Here's my query, in CodeIgniter's Active Record: function calculate_invites($userid) { $this->db->where('id', $userid) ->update('users', array('invites' => 'invites-1', 'sentinvites' => 'sentinvites+1'), FALSE); } The fields invites and sentinvites are both integers but are set to 0 after the function is r...

Codeigniter extend library NOT working. No reason.

<?php class MY_Form_validation extends CI_Form_validation { function My_Form_validation() { parent::CI_Form_validation(); } } This is the code in the file MY_Form_validation.php that I have created in my CI libraries folder. There were some functions in there but i removed them to try and get to the bottom of th...

How to set custom error message with form_validation And CodeIgniter

Hi, i am newbie in CodeIgniter...and i am trying to do form validation for array input... the array name is pages[]. and i wrote: $this->form_validation->set_rules('pages[]','','required'); if i use that: $this->form_validation->set_message('required', 'you not selected pages.'); it will not change the other "required" validation...

[PHP] Codeigniter request control class

hi all guys, i'm trying to do myself a good simple request control library. this is my code: class CI_Request { public function isAjax() { return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; } public function isPost() { return isset($_POST)...

Google OpenID auth not working on shared host but works on localhost

I am using CodeIgniter along with a module called A3M for authentication users with their Google ID. Everything works like a breeze on localhost but I am not able to connect to google from my live server. Can it be because of shared hosting ? ...

Map CodeIgniter Validation class to Jquery validation

Hi everyone, I am using the CI validation class to do server-side validation and Jquery validation to do client-side validation. Is there some way I can leverage the CI validation and form building, so that when it is creating the form elements it creates them with class="<equivalent of CI validation rules>"? This way, if I change the v...

Forum/Board written atop one of the big PHP Frameworks

I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more s...