codeigniter

SVN Web Development - Path / OS Differences

Hello, What is the best way to deal with config / directory / OS differences using SVN to develop and deploy on 2 different platforms? I am developing in Windows and deploying to Linux. I'd like to use my home PC to test the files before using commit, I'm using a web framework and you must specify the paths to your system and applicat...

How to return all database rows with certain field value.

Hey, I have a database table called "projects" with the fields 'id', 'locationid', 'name' and 'year'. I query the database to retrieve all the values and store them in $data, before passing them into the relevant view. In what part of the website, I have created a timeline (made of list items generated with a foreach). In this timelin...

How do I select only rows that don't have a corresponding foreign key in another table in MySQL?

I have 3 tables: listing photo calendar "photo" and "calendar" both have a "listing_id" column in them and every "listing" has a "photo". But I only want to select rows that have no entry in the "calendar" table with the matching "listing_id". I'm not sure if I'm saying it correctly, but any help would be greatly appreciated. And if...

CodeIgniter / Xinha ImageManager not uploading images

Hello, I'm using the Xinha text editor in a CodeIgniter project, and normally it works very well, but this has got me stumped. When I click the ImageManager icon in the Xinha, it loads the dialog box as usual, and allows me to upload an image. Within the editor, it shows that my image is uploaded, yet when I look directly at the direct...

codeigniter pagination class : change seprator

hi , i want to create pagination like example below , using codeigniter pagination library 1 | 2 | 3 | 4 ..... but when i look at config array in that library there is no option to do that . how can i fix this . ...

How can I set a logged in session to be remembered for 2 weeks in CodeIgniter?

If a user logs in and selects "Remember me for 2 weeks", I want the session to remember them for 2 weeks. If not, it should expire in 2 hours. How do I do this? ...

What does it mean when I can't "use method return value in write context"?

When I use this statement if(count($this->input->post('p_id') =0)), I keep getting this error: Fatal error: Can't use method return value in write context in C:\xampp\htdocs\CI\professional_ci\application\models\MProducts.php on line 249 But when I use if(count($this->input->post('p_id'))), it works. What does it mean I can't us...

Can I reload a session from a session_id in CodeIgniter?

I want to get a session loaded by the Session class given a particular session id. Is this possible? ...

How do I array push this 2-D array? (PHP)

In this codeigniter model, I am trying to push the category name of each product. I want the array to look like: Array ( [0] => Array ( [id] => 1 [name] => Game 1! [category_id] => 3 [category] => games //the category element is in the [0] array. ) [1] => Array ( ...

How to write a query in CodeIgniter Active Record

Hi all, I'm having some issues getting codeigniter active record to produce a query like this: SELECT fruits.* FROM fruits WHERE fruits.color = 'red' AND ( fruits.size = 'medium' OR fruits.name = 'kiwi' OR fruits.length = 7 ); Basically I want to have several or clauses but one where clause that is always enforced. $this->db->select(...

Are Codeigniter Active Records automatically escaped?

http://codeigniter.com/user_guide/database/active_record.html Is everything automatically escaped for you? ...

php codeigniter - strtotime error.

Getting strtotime error in php-codeigniter and the problem arises only in windows 7 not in windows xp. Error : [2048] strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used a...

PHP error driving me crazy

Fatal error: Call to undefined method CI_DB_mysql_driver::num_rows() in C:\Development\Zend\Apache2\htdocs\system\application\controllers\signup.php on line 47 Can anyone help me out, this error is driving me crazy. Using latest CodeIgniter. function isUniqueUsername($string) { $query = $this->db->select('username') ...

Codeigniter - How to add Images to my CRUD methods?

Hi, I am working on my second CI application. I have created some simple CRUD methods in my controller. My client has requested that each record includes an image. I have searched the forums and other resources for help but haven’t had much luck. I have managed to upload files into a directory using the File Uploading Class, my problem...

Change Language in Runtime

Hi, I'm trying to change the language of one webapp in realtime using codeigniter. I follow the online documentation, create the folder for language2 with all the traductions, but when I do: $this->config->set_item('language', 'portuguese'); It don't change the lang, the only way it works is changing the config file ex: $config['...

Printf syntax parser for PHP/Codeigniter?

Using PHP and/or Codeigniter, I want to create some string templates to be store in a database so that later, they can be used to print out a customize statement. For example, I want to store this "hello %s! you are the %d visitor." in my database so that later I can plug in a name and number to print out this message "hello bob! you ar...

using lightbox with code igniter

I'm trying to use Lightbox with my CodeIgniter application. Lightbox says to put the following in the head tag: <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="s...

Modernizr With Codeigniter

I am having difficulty trying to get modernizer to run with codeigniter. this is what I've done so far. downloaded Modernizr and renamed the file modernizr-1.5.min.txt to modernizr-1.5.min.js put the JavaScript file in the same directory as my header file is: apppath/views/tops/ included the file in my headings <script src="modernizr-...

What is faster for radial location based search? Lucene or Sphinx?

I'm part of a development team working on a job board, and we're considering both Lucene and Sphinx for out search base. Does anyone have experience working with either of these open-source tools for location based search? ...

Best method for URI Routing this in CodeIgniter?

Hi folks! So, here's an example on Forrst, a CodeIgniter website: http://forrst.com/posts/PHP_Nano_Framework_WIP_Just_throwing_some_ideas_o-mU8 Look at that nice URL. You've got the root site, then posts, then the post title and a short extract. This is pretty cool for user experience. However, my CodeIgniter site's URLs just plain s...