Welcome Guest, Not a member yet? Register   Sign In
  Building Enterprise level application using Codeigniter
Posted by: El Forum - 06-27-2008, 02:14 AM - Replies (12)

[eluser]Nikhil Vijayan[/eluser]
I am planning to use Codeigniter for an enterprise level web application. which will have 2-3 million visitors per month .. the goal is to serve maximum users with minimal server resources..

So do u guys have any suggestions ,advice for me ?

Do u think its better NOT to use any frameworks ?

What about Active record , etc .. Does disabling Active record improve performance ? if yes why ? we are using mysql as DB so i dont need other db drivers so does disabling them help improve performance ? ...

Let me know what your experience using codeigniter is..

Between i will be also using matchbox for modular separation.

Looking forward to hear from u all...


  Grabbing and echoing only fragments of views
Posted by: El Forum - 06-27-2008, 01:34 AM - Replies (13)

[eluser]Dave Stewart[/eluser]
Hi All,

I'm still at the "poking around" stage of using CI, so apologies in advance that I'm not backing up this question with concrete development just yet (that will come).

Obviously, using load->view(), one can load separate elements of a page to build up a full page, eg:

Code:
load->view('header', $data);
load->view('body', $data);
load->view('footer', $data);

And you would expect to store these as separate HTML fragments in individual files.

However, what I want to know is if it's possible at the moment (or if would have to extend to View class to add my own functionality) to add fragments of an individual HTML / PHP page, for example:

Code:
load->view('master', 'header', $data);
load->view('master', 'body', $data);
load->view('master', 'footer', $data);

My reasoning for this is that I would like to store complete HTML pages (with full CSS etc) that I can edit in a WYSIYWG editor, then only extract the body of each one perhaps when loading views.

Thanks in advance for your help,
Dave


  Selecting between a date
Posted by: El Forum - 06-27-2008, 01:14 AM - Replies (10)

[eluser]E303[/eluser]
I was able to run this query in phpMySQLAdmin but when it comes to getting CI to run the query nothing seems to work.

Code:
$sql = 'SELECT * FROM `exhibitions` WHERE \'2008-06-27\' BETWEEN `date` AND `endDate`';

Where you see 2008-06-27 I want to place todays date...

eg
Code:
$today = date("Y-m-d");


I get errors either there is no column called '2008-06-27' or like at the moment I don't get any results back.

Thank in advance


  Delete files from directory
Posted by: El Forum - 06-27-2008, 12:44 AM - Replies (18)

[eluser]Zeeshan Rasool[/eluser]
Hi, anyone here that tell me about this prob.This is function in model i want to delete uploaded video file from folder './public/videos'

$this->db->where('video_id', $video_id);
$this->db->select(trim('video_path'));
$query = $this->db->get('help_video');
foreach($query->result() as $item)
{
$old_video_path=($item->video_path);
}
delete_files('./public/videos/'.$old_video_path);
$this->db->where('video_id', $video_id);
$this->db->delete('help_video');


Problem:the information such as video title and path is deleted from DB but video file is still in directory. What shud me do!
.....thnx in Adv.


  301 Redirects
Posted by: El Forum - 06-26-2008, 09:33 PM - Replies (3)

[eluser]E303[/eluser]
With the .htaccess file setup for friendly urls, I am having problems with setting up 301 redirects.

When i put the code in for the 301 redirects my css doesn't load for the site. It seems anything that I use <?= base_url();?> doesn't load properly. What is the solution?


  Messing with pagination all day and I'm almost there.
Posted by: El Forum - 06-26-2008, 07:17 PM - Replies (3)

[eluser]internut[/eluser]
This is probably very ugly but it seems to be working well thus far. Still have a few things to add.

Its doing pagination, sorting (keeping track of sort during page changes via cookie).

Any thoughts?

Code:
// Here we go with pagination

        $data[user_count] =  $this->db->count_all('users');

        if(get_cookie('user_sort')) {
            $sort = get_cookie('user_sort');
        }


        if($this->uri->segment(4)) {
          $sort = $this->uri->segment(4);
          setcookie("user_sort", $sort);
        };

        if(!$sort) {             $sort = "last_name";         }

        if($this->uri->segment(3))    {  $start = $this->uri->segment(3) ;  }
        if(!$start)                   {  $start = 0;  }

        $this->load->library('pagination');

        $config['base_url'] = site_url() . "/users/page/";
        $config['total_rows'] = $data[user_count];
        $config['per_page'] = '5';
        $config['uri_segment'] = 3;
        $config['num_links'] = 5;


        $data['query'] = $this->db->query("SELECT * FROM users ORDER BY $sort ASC LIMIT $start,$config[per_page]");     // query time

        $this->pagination->initialize($config);
        $data[pages] =  $this->pagination->create_links();

        $data[sys_message] = $this->session->flashdata('sys_message');  // set system message to display

     $this->load->view('users_view',$data);


  Calendar and Sheduler, how to?
Posted by: El Forum - 06-26-2008, 06:47 PM - Replies (12)

[eluser]Référencement Google[/eluser]
Hi,

One of my client that is DJ need that I code for him an availability Scheduler.

He want something really simple, just to show in the public website that he is available or not on a specific date or range of dates. The admin area should be simple too, I can imagine that I can make him select a range of dates or pick a single date on a JS calendar. There is no plan yet to do a reservation depending on available dates, but that's a functionality that can come later.

So my question is:
How would you go for this kind of things with the DB fields / tables, with CI libs,... ? If you have some PHP libs that I can rely my code on, I would be very happy too !

Thanks in advance.


  CodeIgniter 1.6.3 Maintenance and Security Release
Posted by: El Forum - 06-26-2008, 06:02 PM - Replies (47)

[eluser]Derek Jones[/eluser]
We are happy to release CodeIgniter version 1.6.3 today. Version 1.6.3 is primarily a maintenance release, with a variety of bug fixes and some refinement to existing features (with a few new ones tossed in for good measure!) Details of course can be found in the Change Log.

Continue reading...


  Hooking / modifying database connections?
Posted by: El Forum - 06-26-2008, 03:52 PM - No Replies

[eluser]degu[/eluser]
Hello,

is there a good way to execute code directly after the database library has established a database connection?

Background: CodeIgniter assumes that double quotes (") are a good way to quote identifiers in sql queries for MS SQL Server (see _protect_identifiers in mssql_driver.php). This doesn't always work, as SQL Server's way of quoting identifier is to use brackets like this:

Quote:SELECT * FROM [tablename]

Anyway, in order to tell MS SQL Server to understand double quotes, one has to execute a query to configure the database connection like this:

Quote:$CI->db->simple_query('SET QUOTED_IDENTIFIER ON');

Now the question is where would be the best way in an application to execute this code? I would like to auto load the db library and already tried to use the post_controller_constructor hook to execute the above code, but it looks like this might be to late.

Thanks.


  Having problems with validation class at godaddy
Posted by: El Forum - 06-26-2008, 02:26 PM - Replies (2)

[eluser]lynkyle[/eluser]
I just can't seem to get past this hurdle.

In my development server, the validation class is working perfectly.

But when I tested it at Godaddy, validation errors are not displayed and $_POST variables seems lost too. (ie, the entries in the forms are lost when the page reloads in where the errors also should display).

Any ideas anyone? Thanks a lot.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
SQL server connection not...
by kenjis
1 hour ago
CI 4.5.1 CSRF - The actio...
by kenjis
1 hour ago
CodeIgniter v4.5.0 Releas...
by kenjis
1 hour ago
Cache best practice?
by BhambriRohunu
2 hours ago
Bug with sessions CI 4.5....
by InsiteFX
3 hours ago
Codeigniter Shield Bannin...
by kenjis
7 hours ago
Best way to create micros...
by kenjis
10 hours ago
How to use Codeigniter wi...
by kenjis
10 hours ago
Getting supportedLocales ...
by kcs
Yesterday, 09:30 AM
Component help
by FlashMaster
Yesterday, 01:41 AM

Forum Statistics
» Members: 85,296
» Latest member: sv368company
» Forum threads: 77,577
» Forum posts: 375,985

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB