Welcome Guest, Not a member yet? Register   Sign In
  Custom library extending custom libraries
Posted by: El Forum - 03-31-2008, 05:36 AM - Replies (20)

[eluser]Spockz[/eluser]
I'm trying to get my custom libraries to extend eachother. However if I extend a custom classfile I get a 'class not found' error in the file 'my_library.php'. I can resolve this by including a 'include' command. However this is not a nice solution, as I'd rather use the autoloader.

I've got the following code:

Code:
class My_Controller extends Controller{
  function __construct() {
    $this->load->library('my_library');
  }
}

Now i've the file 'my_library.php'. Placed in the application/libraries directory.
Code:
class My_Library extends My_Parentlibrary {
  ...
}

The file 'my_parentlibrary.php' contains the class:
Code:
class My_Parentlibrary {
  ...
}

Is there anyone familiar with this problem? Or knows a solution to this?


  Javascript calendar problem
Posted by: El Forum - 03-31-2008, 05:31 AM - Replies (6)

[eluser]Caelis[/eluser]
Hi there,

I've taken up coding with CodeIgniter again.
Yet i'm bumping into a small problem.

I want to use the js_calendar plugin on my pages.
But I would like to add events (stored in a database-table) to the calendar days.

Then when clicking the days that have events attached,
it should load a view without reloading the whole page.

Currently the js_calendar only allows to click on a date and store that in a text-field.

If someone could be so kind to point me in the right direction as to handle this problem?
I guess I'll have to write additional javascript procedures but how do I make sure I won't have to rewrite everything when a new CodeIgniter version comes out...

Any help will be greatly appreciated! Smile


  CI keeps ignoring my coding now i am going mental
Posted by: El Forum - 03-31-2008, 05:12 AM - Replies (4)

[eluser]steel_slasher[/eluser]
ok basically i modded the session lib so that it would check if the email and password in the cookie are valid so i added a few lines which have a SQL query which checks for the information given then checks them in an if statement heres the code:

Code:
if(isset($session['email'])){
                $query = $this->CI->db->query("SELECT * FROM `cookies` WHERE `email` = '{$session['email']}' AND `password` = '{$session['password']}'");
                foreach ($query->result() as $row)
                {
                    $email=$row->email;
                    $password=$row->password;
                }
                if($email!==$session['email']){
                $this->sess_destroy();
                return FALSE;
                }
                if($password!==$session['password']){
                $this->sess_destroy();
                return FALSE;
                }

                }

i also made another mod where the session lib checks the cookie for a "forget" value and then checks if the cookie has been expired after a given time in a custom config value

Code:
$expiration = $this->CI->config->item('sess_expiration');
        if(isset($session['forget']))
        $expiration = $this->CI->config->item('sess_expiration_forget');
        if (is_numeric($expiration))
        {
            if ($expiration > 0)
            {
                $this->sess_length = $this->CI->config->item('sess_expiration');
            }
            else
            {
                $this->sess_length = (60*60*24*365*2);
            }
        }

the real problem is that no matter what the email and password check fails and the forget value is never set because the email and password check fails. I NEED HELP!!!!!!!!


  OD BC -Example
Posted by: El Forum - 03-31-2008, 04:21 AM - No Replies

[eluser]Unknown[/eluser]
Please provide a small OD BC-Example.Currently I am using MS-ACCESS as database.
While using code igniter 1.6 , I was only able to connect but was not able to retrieve data.


  Loading two models in one view, causes problems?
Posted by: El Forum - 03-31-2008, 03:24 AM - Replies (2)

[eluser]geshan[/eluser]
Hello all code igniter users,
I had to load two models in the same view how can I do it? it shows no erros when I load the second model in the view but when I call a function of the second model it gives me error says the 2nd model name is not identified. How can I load two models in one view?


  need help
Posted by: El Forum - 03-31-2008, 02:57 AM - Replies (4)

[eluser]Unknown[/eluser]
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);
who can help me translate this to sql syntax
Is it right "select * from mytable where id=$id $offset $limit"


  Fatal error: Call to undefined function: ob_get_level() in c:\apache\htdocs\codeigniter\system\libraries\Exceptions.php
Posted by: El Forum - 03-31-2008, 02:52 AM - Replies (8)

[eluser]bricx87[/eluser]
I am a beginner/ new user of Code Igniter,

I have already installed it on my localdrive and when I tried to execute a sample "helo world" program on a browser...

Ive encountered this problem:

Fatal error: Call to undefined function: ob_get_level() in c:\apache\htdocs\codeigniter\system\libraries\Exceptions.php on line 57

can anyone help me fix this problem?


tnx


  Search with an apostrophe in mySQL
Posted by: El Forum - 03-30-2008, 11:31 PM - Replies (2)

[eluser]mexor[/eluser]
When searching for something like "Ocean's 11" I get a database error:

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's 11%' ORDER BY title ASC' at line 1

SELECT * FROM addDVD WHERE title LIKE '%ocean's 11%' ORDER BY title ASC

How do I get around this?
Thanks!


  Very Irritating Problem
Posted by: El Forum - 03-30-2008, 08:58 PM - Replies (9)

[eluser]Developer13[/eluser]
Somebody please help me out here... my brain is just fried on this issue!

Let's say I want to generate the following query via CI's active record:

SELECT * FROM table WHERE last_name = 'Terry' AND (first_name = 'Alex' OR first_name = 'Jesse')

How in the world do I indicate that I want the AND and the OR separated by parenthesis?

Of course the actual query is much larger and more involved than the example and I'd like to stick with CI's active record if possible.

Any ideas would be greatly appreciated!


  Problems with Ajax library, submit to remote
Posted by: El Forum - 03-30-2008, 08:36 PM - No Replies

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

Whem I try to submit to remote I get this error message:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: options

Filename: libraries/Ajax.php

Line Number: 202


It means I cant submit to remote?
My call is like: $this->ajax->submit_to_remote("Inserir imagem", array('url' => '/html/add_top_image', 'update' => 'html_topo'))


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

Username
  

Password
  





Latest Threads
Modify users data as an a...
by xsPurX
12 minutes ago
Defining extra constants ...
by ramonpuig
4 hours ago
Error / Shield 1.0.3 + Ci...
by kcs
6 hours ago
Bug with sessions CI 4.5....
by ALTITUDE_DEV
7 hours ago
Validation | trim causes ...
by kenjis
9 hours ago
Integrating Bootstrap 5 i...
by Bosborne
10 hours ago
Asset Minification Packag...
by tarcisiodev1
Yesterday, 05:11 PM
Is it possible to go back...
by ejimenezo
Yesterday, 11:49 AM
SQL server connection not...
by davis.lasis
Yesterday, 07:11 AM
Problem with session hand...
by Julesb
Yesterday, 04:13 AM

Forum Statistics
» Members: 85,564
» Latest member: 8xbet22bett
» Forum threads: 77,586
» Forum posts: 376,035

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB