Welcome Guest, Not a member yet? Register   Sign In
  Version 2.0
Posted by: El Forum - 11-29-2008, 05:50 AM - Replies (6)

[eluser]mattalexx[/eluser]
I keep hearing about version 2.0 coming. When is it expected?


  Advice using CI Database Transactions
Posted by: El Forum - 11-29-2008, 05:05 AM - Replies (2)

[eluser]Rey Philip Regis[/eluser]
Hi guys, I need you help again. Just want your advice cause Im having a small problem on where to put my transaction whether to put in a CONTROLLER or in a MODEL or simply create a LIBRARY then do the transaction there. Sample I have a method insertUser() in my users_model class and an insertAddress() in my address_model class. So I want to do a transaction, so id one of the insert method fails, it will rollback. What do you think about that?

Good day.


  table data problem with dompdf
Posted by: El Forum - 11-29-2008, 03:57 AM - No Replies

[eluser]henrihnr[/eluser]
Hi..

I'm having problem in generating pdf file that contains table data in more than 20 rows..
works fine if the table data below 20rows..

here's the error message:

Fatal error: Uncaught exception 'DOMPDF_Internal_Exception' with message 'Frame not found in cellmap' in C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\cellmap.cls.php:237 Stack trace: #0 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\table_cell_frame_reflower.cls.php(66): Cellmap->get_frame_position(Object(Table_Cell_Frame_Decorator)) #1 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\frame_decorator.cls.php(387): Table_Cell_Frame_Reflower->reflow() #2 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\table_row_frame_reflower.cls.php(70): Frame_Decorator->reflow() #3 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\frame_decorator.cls.php(387): Table_Row_Frame_Reflower->reflow() #4 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\table_frame_reflower.cls.php(468): Frame_Decorator->reflow() #5 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\frame_decorator.cls.php(387): Table_Frame_Reflower->reflow() #6 C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\block_frame_reflower.cls.p in C:\wamp\www\CodeIgniter\system\plugins\dompdf\include\cellmap.cls.php on line 237

could anyone help me please..


  Should each database table have its own distinct model?
Posted by: El Forum - 11-29-2008, 01:24 AM - Replies (2)

[eluser]peterbz[/eluser]
Should each table have its own distinct model? Or can several similar databases be grouped under one model? Which is the right convention in the MVC approach?

For example, I have tables "invitations" and "invitations_pending". Now both of them are linked and call from one of them usually links to another call of the other database. Should I make a model called "invitations_model" that uses both of these databases?


  Having some trouble with form validation
Posted by: El Forum - 11-28-2008, 10:40 PM - Replies (3)

[eluser]baalwww[/eluser]
Hi. I'm having some trouble with form validation. The docs show the validation example with a form that is displayed immediately. In my case, I'm returning the form in a variable, and then passing it as content to be displayed in the center section of a formatted page...

Code:
function login()
      {
        $this->load->helper(array('form', 'url'));
        $this->load->library('form_validation');
        
        $this->form_validation->set_rules('email','Email','required|valid_email|trim|xss_clean');
        $this->form_validation->set_rules('password','Password','required|trim|xss_clean');
        
        if ($this->form_validation->run() == FALSE)
        {
            $data['content']=$this->load->view('admin_login','',true);
        }
        else
        {
        }
            $this->load->view('frame',$data);

The else is empty because whether the login form should be shown or the login is successful, the formatted page is shown, so there's nothing needed in the else clause.

The problem is that the validation messages don't show. If the form doesnt validate, I just get the form again with no messages.


  transactions, sleeping queries and hanging php5.cgi processes
Posted by: El Forum - 11-28-2008, 08:56 PM - Replies (6)

[eluser]yekibud[/eluser]
I don't know if this is a CodeIgniter issue, a PHP or MySQL config issue, or something else going on with my hosting service (DreamHost), but here's the problem:

Multiple subsequent queries cause a number of php5.cgi processes to launch. They do not terminate and my web-app hangs. Looking at MySQL show processlist, I see a sleeping query for each php process.

Note:
- My MySQL tables are InnoDB so that I can use foreign key constraints for delete operations. I don't know if this makes any difference.
- PHP is being run as CGI

Everything works fine in my local development environment where I have PHP running as an Apache module.

Any tips would be greatly appreciated.


  Pagination
Posted by: El Forum - 11-28-2008, 07:26 PM - Replies (8)

[eluser]nCoder[/eluser]
Ok CI newbie here...

Have probably rather simple question about paging.

I have path that looks like this
somesite.com/books/page/10
that url will show books (items), page 10, and works fine...

BUT if books are divided in some categories let's say: horror, thriller, adventure, science, computing, biology ... etc (lots of those categories), how can I make pagination work with this.

Is this good way of putting it:
somesite.com/books/page/10?cat=science
or maybee this:
somesite.com/books/science/page/10

Or should I just save that category in session and read it from it whenever is needed?
What are your best practices...

Thanks!


  Creating a WordPress MU-ilke application using CI
Posted by: El Forum - 11-28-2008, 02:37 PM - No Replies

[eluser]psdtocode[/eluser]
Hello,

I posted a thread the other day asking about the .htaccess side of developing an application like this, but I realized the way I was using CI wasn't the best way. The basic idea of this app, is to allow people to signup for the service, and they would get their own mini-blog website (there are some things we do and don't need, so WPMU won't work well). I want to find the best way to structure my URI, my controllers, methods, etc. so it will work the best.

I was originally going to do something like:
http://www.domain.com/index.php/site/view/sitename

However, that posed a problem when I needed to do something like this:
http://www.domain.com/index.php/site/vie...e/post/123

It was too long, and it didn't allow me to easily use a post method in my controller to display the posts. My question is if there is an easier way to go about this, to pass the sitename variable in the URL.

My goal is to end up, through .htaccess, URLs that look like:
http://sitename.domain.com/post/123

Does anyone have any ideas on the best way to structure the URL's, the controllers, and all other aspects of this app? Can you point me in the right direction?

Thanks,
Andrew


  get array of months between 2 dates
Posted by: El Forum - 11-28-2008, 12:57 PM - Replies (3)

[eluser]new_igniter[/eluser]
Hello,
Does anyone have a php function for finding the array of months values based on two dates?

for example

Code:
function getMonths('2008-01-01','2008-05-01') {

some code...


}
Thanks!!!


  HMVC (ME) and form validation in CI 1.7
Posted by: El Forum - 11-28-2008, 12:22 PM - Replies (1)

[eluser]freshface[/eluser]
Can anyone confirm that the form validation + HMVC of wiredesign is broke in Ci 1.7?


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

Username
  

Password
  





Latest Threads
Update to v4.5.1, same us...
by xsPurX
3 hours ago
SQL server connection not...
by falagar2k
7 hours ago
How to use Codeigniter wi...
by kenjis
7 hours ago
CVE-2022-40834 SQL Inject...
by kenjis
8 hours ago
Retaining search variable...
by pchriley
8 hours ago
Disable debug output in v...
by groovebird
9 hours ago
CI 4.5.1 CSRF - The actio...
by kenjis
11 hours ago
CodeIgniter v4.5.0 Releas...
by kenjis
11 hours ago
Cache best practice?
by BhambriRohunu
Yesterday, 11:10 PM
Bug with sessions CI 4.5....
by InsiteFX
Yesterday, 10:42 PM

Forum Statistics
» Members: 85,366
» Latest member: choangclubuk
» Forum threads: 77,578
» Forum posts: 375,998

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB