Welcome Guest, Not a member yet? Register   Sign In
  --Is there a controller hierarchy ?
Posted by: El Forum - 10-15-2007, 06:26 PM - No Replies

[eluser]Unknown[/eluser]
Hi I am a newbie to CI. I created a controller which extends the Controller:

class BaseSessionController extends Controller {
// some logic here
}

Then I tried to create another controller class which extends the BaseSessionController:

class SubController extends BaseSessionController {
// some logic here
}

These two controllers are in two different php files -- both in the controllers folder. It seems that BaseSessionController could not be recognized by SubController . I am wondering if I have to manually include the BaseSessionController script file in my SubController script, using require() or require_once().


  Is there a controller hierarchy ?
Posted by: El Forum - 10-15-2007, 05:41 PM - No Replies

[eluser]Unknown[/eluser]
Hi I am a newbie to CI. I created a controller which extends the Controller:

class BaseSessionController extends Controller {
// some logic here
}

Then I tried to create another controller class which extends the BaseSessionController:

class SubController extends BaseSessionController {
// some logic here
}

These two controllers are in two different php files -- both in the controllers folder. It seems that BaseSessionController could not be recognized by SubController . I am wondering if I have to manually include the BaseSessionController script file in my SubController script, using require() or require_once().


  CI for php5 ONLY
Posted by: El Forum - 10-15-2007, 05:16 PM - No Replies

[eluser]Unknown[/eluser]
I'd like know if exists someone project to change the CI for php5 only.

Regards,

Henrique de Castro


  Value from $this->uri->segment(1);
Posted by: El Forum - 10-15-2007, 04:00 PM - No Replies

[eluser]Subey[/eluser]
Hello

I need get value from www.somedomain.com/value.

My route:

$route['default_controller'] = "go";
$route['scaffolding_trigger'] = "";
$route[':num/:any'] = "go/index/$1";


in controller go.php:

function index($value){
$value = $this->uri->segment(1);
echo $value;

}

What i can do it??


  xajax function arguments not passing, missing arguments warning
Posted by: El Forum - 10-15-2007, 01:38 PM - No Replies

[eluser]CodeIgniter Fan[/eluser]
Hi

Please help my xajax function not getting arguments. I got warning missing arguments 1 for myajaxfunction(). I am sending my table id by onclick button event.

Need urgent help.

Thanks in advance.


  Thinking of Switching From Rails - How does CI Perform In the Real World?
Posted by: El Forum - 10-15-2007, 01:16 PM - No Replies

[eluser]Unknown[/eluser]
I know there already are some CI vs. Cake vs. RoR threads, which I read and found helpful. I'm mostly looking for some fresh answers to a more specific line of questions. I apologize for the noobish nature of this post - but I bet there are a lot of Rails guys out there that feel like the platform might not be all that amazing for long term development.

I've been developing sites with Rails for about 2 years now. I enjoy the process, ruby is a fun language and was easy to learn, but a constant problem has been dealing with the lack of support for RoR, difficult configuration, weird errors and sluggish performance.

Rails seems ready for prime-time if you have the cash and staff to manage the issues, but if you are a small shop like mine, it can be a real pain. I'm currently dealing with the aftermath of MediaTemple's meltdown during the first half of october so it is time to examine frameworks that are not such Diva's.

I have some experience with PHP, as it's what I used primarily before switching to RoR, and CI seems like a slightly better fit for me than Cake.

What have your experiences been with installation ease / speed & performance / reliability?

Is resource consumption a big concern?

How beefy a setup would be needed for someone launching lots of small to medium sized sites? What about very large (5000 page +) sites?

Any recommendations or warnings on hosting?

Thanks in advance for reading and any advice. To entertain you I added a fun car comparison poll.


  MS SQL Server and pagination
Posted by: El Forum - 10-15-2007, 12:00 PM - No Replies

[eluser]ELRafael[/eluser]
Hello again.

I have a problem with pagination + MS SQL Server (2000 version)

If i just use this code

Code:
$this->db->limit(5, 10);
$query = $this->db->get('table');

Don't work. I wanna to get the 5 first regs. In MySQL is easy as a piece of cake, but in MSSQL Server doesn't work. M$ SQL does not support offset!!

If i put an echo, $this->db->last_query(), shows a message with TOP (SELECT TOP 5), but this is not working (merda!)

I readed many topics but still haven't found what i looking for (oh, i know what i'm looking)

Someone light on?


  IBM's Getting Started With PHP Frameworks (CodeIgniter)
Posted by: El Forum - 10-15-2007, 11:40 AM - No Replies

[eluser]Michael Wales[/eluser]
IBM publishes some really great articles/tutorials on their site but they most often focus on Ruby on Rails, or other PHP frameworks with a bit more "star power" behind them.

In their most recent tutorial, PHP frameworks, Part 1: Getting started with three popular frameworks they focus on the Zend Framework, CakePHP, and Symfony (although they do recommend checking out other frameworks, in which CodeIgniter was the first listed).

I've decided to start a translation of this article, you can find the first part live on my blog (IBM’s Getting Started with PHP Frameworks (CodeIgniter)) and I will continue to post the follow-up articles as IBM publishes theirs.

It will be interesting to perform some line-by-line comparisons and execution benchmarks on this application across the frameworks features and CodeIgniter, when all is said and done.


  htaccess problem, rewrite to stats folder
Posted by: El Forum - 10-15-2007, 10:51 AM - No Replies

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

I've get a problem, cannot find a solution since I am not very good with htaccess and regular expressions. I have a stats folder on www.mysite.com/awstats/ and the problem is that codeigniter "think" it is a controller. So here is my .htaccess actually:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # If the file or directory exists, show it
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    RewriteRule ^awstats$ /awstats/  [L]
    
    # Blank queries get sent to the index
    RewriteRule ^$ index.php [L]
    
    # All other queries get sent to the index as index.php/whatever
    # RewriteRule ^(.*)$ index.php/$1 [L]
    
    RewriteCond $1 !^(index\.php|images|robots\.txt|js|css|user_guide)
    RewriteRule ^(.*)$ /index.php/$1 [L]

</IfModule>

Any help please?


  Referencing SQL Statement Within an SQL Statement
Posted by: El Forum - 10-15-2007, 10:41 AM - No Replies

[eluser]RobbieL[/eluser]
I managed to get this done in Coldfusion, but having a bit of bother with CI. Basically, in my SQL WHERE statement, I need to reference a previous SQL statemenr to get the data I need. In this case, I want to list each school, with a list of the delegates underneath each school

These are my SQL statements at the moment:

Code:
#Get list of schools
$data['getSchools'] = $this->db->query("SELECT schoolName FROM schools GROUP BY schoolName");
        
#Get delegates
$data['getDelegates'] = $this->db->query("SELECT d.forename, d.surname, s.schoolName FROM delegates d LEFT JOIN schools s ON d.schoolId=s.id WHERE d.schoolId=s.id AND s.schoolName = '".$data['getSchools']."'");

And here's the PHP in my view:
Code:
&lt;? foreach($getSchools->result() as $row)
{?&gt;
    &lt;?=$row->schoolName;?&gt;
    
    &lt;? foreach($getDelegates->result() as $row)
    {?&gt;
        &lt;?=$row->forename;?&gt; &lt;?=$row->surname;?&gt;
    &lt;?
    }?&gt;
&lt;?
}?&gt;

The code doesn't spit out any areas, and does print the schools, just doesn't print the delegates from those schools. Not to sure were I'm going wrong.

I hope that all makes sense. Appreciate any help that can be given.
Cheers.


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

Username
  

Password
  





Latest Threads
Update from 4.6.0 to 4.6....
by FlavioSuar
Today, 04:17 AM
Setting baseURL in Regist...
by petewulf1
Today, 03:20 AM
Sessions old files are de...
by InsiteFX
Yesterday, 10:30 PM
Ajax post failing with Ty...
by PaulC
Yesterday, 12:23 AM
intermittent smtp failure...
by InsiteFX
05-11-2025, 11:30 PM
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
05-10-2025, 10:33 AM
CodeIgniter Shield 1.0.0 ...
by timesprayer
05-10-2025, 05:22 AM
Website Traffic Drop Afte...
by InsiteFX
05-10-2025, 04:23 AM
Magic login link not work...
by InsiteFX
05-10-2025, 04:16 AM
Is codeigniter 5 upco...
by InsiteFX
05-10-2025, 04:10 AM

Forum Statistics
» Members: 145,830
» Latest member: DigitalesGeld
» Forum threads: 78,388
» Forum posts: 379,447

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB