Welcome Guest, Not a member yet? Register   Sign In
  CI media temple
Posted by: El Forum - 07-24-2008, 03:45 PM - Replies (3)

[eluser]SpooF[/eluser]
I've been developing a web site with CI on a media temple account and It seems to be really slow. I haven't tried to move the web site to a different serve to see if there is a speed boost, but I was wondering if anyone else ever has any problems. My pages take between .1 and 5 seconds to load. I've never had a CI web page run this slow before.


  Problem with DB encoding.....
Posted by: El Forum - 07-24-2008, 01:01 PM - Replies (2)

[eluser]louis w[/eluser]
I am trying to update a field in the db with an xml string but it's getting very garbled with the db encoding. As a safety measure I did not want to turn it off thou.

My application does a pass over the xml value to encode certain characters such as "smart" curly quotes into their encoded value. (e.g. ‘ )

If all i try to update is a right curly quote, the final query to the db is:
<description>&lt;![CDATA[<p>&#xC3;&#xA2;&#xC2;&#x20AC;&#xC2;&#x153;</p>]]></description>

What's with ALL THE CRAZY stuff in there? It's causing a big headache.

I would like for it to remain as a html encoded entity string like &amp;#8216;


  Remote Server CI - My Helpers aren't loading
Posted by: El Forum - 07-24-2008, 12:12 PM - Replies (1)

[eluser]spherop[/eluser]
Must be an obvious config issue.
But I am trying to figure out why my whole site seems to be working on my remote instance except my own helper file/functions. The site is freshly uploaded from my local dev (for the first time). My config.php and database.php files are appropriately configured on server. Everything else seems to load fine: libraries, models, views, images, includes.

Just any call to one of my helper functions throws an error that I can see in the error log.

"Call to undefined function ago() in ..."

Am I forgetting some obvious config setting ...? or any ideas what might be amiss?


  How to pass values to another page (instead of query string)
Posted by: El Forum - 07-24-2008, 11:57 AM - Replies (4)

[eluser]johnmiller[/eluser]
I have read that codeigniter gives facility to pass values in some other way (instead of query string).

Can you please tell me how to do that?

The below is my view page (blogview.php)

Code:
&lt;?php $counter = count($query);?&gt;

<table border="1">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Address</th>
</tr>
</thead>
<tbody>
&lt;?php
for($i=0;$i<$counter;$i++)
{
?&gt;  
  <tr>
    <td>&lt;?php echo $query[$i]->id;?&gt;</td>
    <td>&lt;?php echo $query[$i]->name;?&gt;</td>
    <td>&lt;?php echo $query[$i]->address;?&gt;</td>
  </tr>
&lt;?php
}
?&gt;
</tbody>
</table>


I need to make 'name' as link.

When I click that, it should go to another page with the corresponding id of that name.

Its 'a href' and 'query string' in normal code.

How to do that in codeigniter?


  Order by primary key is possible?
Posted by: El Forum - 07-24-2008, 11:47 AM - Replies (1)

[eluser]Rubiz'[/eluser]
Hi all..

I think its not possible, but I have a database that has several names of primary keys, exemple promotions_id, news_id, and some with only "id" name.

I use always $this->db->get(); to retrieve this information, but now I see I need to use $this->db->order_by('id', 'desc');, but id registers are with different names, so, I would like to know if is possible make a "order by primary key" or something like that...

Is it?


  Is it a bug at $this->input->post function ?
Posted by: El Forum - 07-24-2008, 11:44 AM - No Replies

[eluser]mihu[/eluser]
hmm ... I am not sure this is a bug or not. Let me try to explain what happened here.

http://ellislab.com/codeigniter/user-gui...input.html

Code:
$this->input->post('some_data', TRUE);
I was trying to run through XSS filter by setting 2nd parameter to "true".

Somehow the XSS filter convert or encoded my string to other encoded characters which trigger a sql error due to using diff. encoded in the same string.

If you enter "


  pConnect problems
Posted by: El Forum - 07-24-2008, 10:50 AM - Replies (3)

[eluser]-sek[/eluser]
I had a query fail several times after disabling persistent connections in the database config. Enabling pconnect apparently restored the query to function again. The only thing I can see from playing with this is that there may some interaction between parameterization and persistent connections. Some other queries that did not use parameters did not fail. Before I get too deep into this, I wonder if anyone has seen anything like this?

Thanks


  incorrect views directory when using hmvc
Posted by: El Forum - 07-24-2008, 10:42 AM - Replies (3)

[eluser]Unknown[/eluser]
hello,
i got a hmvc CI. i want to load a view from my admin module but hmvc looks for it in my default app directory (with views). is this correct?


  Question About Legacy Code....
Posted by: El Forum - 07-24-2008, 10:32 AM - Replies (3)

[eluser]drbigfresh[/eluser]
I am somewhat new to CodeIgniter, but I am trying to convert an old site over to the framework. I need to keep some of the old code working, since I don't have enough time to convert it all at once, but I am running into a problem with some of the old code. I have a page (in my views folder) that includes an old Database call like such:

include_once($_SERVER['DOCUMENT_ROOT'] . '/config/local_db.php');
include_once($_SERVER['DOCUMENT_ROOT'] . "/adodb/adodb.inc.php");


$db = NewADOConnection("mysql");

$db->Connect('localhost', 'root', 'xxx', 'xxx') or die($db->ErrorMsg());

If I go to the page directly, it works fine, but when I go thru the framework I get the 'unable to connect' error message. Does anyone have an idea on how to work around this or what the problem might be?

I have the controller for the page just doing some includes:

function showsubscribepage()
{
$data['title']="Subscription";

$this->load->view('view_header',$data);
$this->load->view('view_subscription',$data);
$this->load->view('view_footer',$data);

}

Any help is way appreciated. Thanks!


  seperate pagination for multiple views loaded from one controller
Posted by: El Forum - 07-24-2008, 08:42 AM - Replies (1)

[eluser]gnomishperson[/eluser]
I have a controller that uses several models to load the necessary data that is used in 3 different ways. Basically it loads all of the DB records, and then 3 views display those records based on their status determined by certain fields within each record.

So some of the records are at a "pending" status, where a portion of the data needs to be updated. Once the pending data has been updated, the record moved to the "assigned" stage, where again additional (not previously available) options need to be updated. Once those are updated, the last stage or status the records can be is "completed".

I have views for each of the individual statuses, but my problem is the views all use the same controller, and the pagination thats loaded from that particular controller calculates "number of records per page" based on a whole, rather than the displayed data for each view.

What would be the easiest way to get the pagination separate and for each of the individual unique views?

Real Basic Psuedocode:

Code:
class List extends Controller {
    function List() {
       parent::Controller();
       $this->load->models('my models');
    }
    index() {
        $config['pagination stuff'];
        $query = $this->Models;

        $data['stuff from query'];

        $validation checks;

        $this-load->view('main_template');
    }
    update() {
        //used for doing the necessary update from the views
    }
}
Views:
Code:
Main_template() {
    $this->load->view('pending')
    $this->load->view('assigned')
    $this->load->view('completed')
    //pagination only shows up here
}

pending() {
    //data from controller with form fields to update data
    //need pagination here
}
assigned() {
    //data from controller with form fields to update additional data
    //need pagination here
}
completed() {
    //data from controller for viewing purposes only.
    //need pagination here
}

I hope this gives somewhat of an idea of what I'm looking for.


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

Username
  

Password
  





Latest Threads
TypeError when trying to ...
by b126
30 minutes ago
Array to HTML "Table"
by HarmW94
37 minutes ago
Webhooks and WebSockets
by InsiteFX
Yesterday, 10:39 AM
Retaining search variable...
by pchriley
Yesterday, 05:46 AM
Reading a session variabl...
by xanabobana
Yesterday, 05:05 AM
Update to v4.5.1, same us...
by kenjis
04-17-2024, 07:47 PM
Codeigniter 4 extend core...
by Semsion
04-17-2024, 05:08 AM
v4.5.1 Bug Fix Released
by lokman
04-16-2024, 02:12 PM
problem with textarea
by Nitin Arora
04-16-2024, 05:07 AM
Showing pdf on browser
by aarefi
04-16-2024, 04:38 AM

Forum Statistics
» Members: 84,503
» Latest member: fullstackmonks
» Forum threads: 77,558
» Forum posts: 375,895

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB