Welcome Guest, Not a member yet? Register   Sign In
load database blank screen
#10

(01-30-2015, 10:24 PM)dbui Wrote: try this simple test

Add this function to your controller
/**
*/
function test_db($terms){
    if($terms){
       $obj = $this->news_model->get_news($terms); // this should return array as per your model code
        print_r($obj);  //should show array output if the term is found in query
    }
    else{
          print 'no terms param is passed on';
    }    
}
/* end test func*/

If you can see the output per 'terms' passed to controller then you have failed to iterate the array in your view, check your code

The testlink url should be in this format  http://yournameserver/news/test_db/anyterm
OR http://yournameserver/index.php/news/test_db/anyterm  
depends on how you set up your codeigniter site

Good luck

Enable log error

or copy this to your index.php

if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
// Report all errors
//error_reporting(E_ALL);

// Display errors in output
//ini_set('display_errors', 1);
error_reporting(E_ALL | E_WARNING | E_NOTICE);
ini_set('display_errors', TRUE);
break;

case 'testing':
case 'production':
//error_reporting(0);
ini_set('display_errors', 1); // This will turn error reporting on
error_reporting(E_ALL);
break;

default:
exit('The application environment is not set correctly.');
}
}
Reply


Messages In This Thread
load database blank screen - by treadman - 01-18-2015, 03:42 PM
RE: load database blank screen - by Avenirer - 01-19-2015, 02:03 AM
RE: load database blank screen - by treadman - 01-19-2015, 06:32 AM
RE: load database blank screen - by Narf - 01-19-2015, 12:05 PM
RE: load database blank screen - by treadman - 01-19-2015, 01:54 PM
RE: load database blank screen - by sneakyimp - 01-22-2015, 01:44 PM
RE: load database blank screen - by CroNiX - 01-21-2015, 01:51 PM
RE: load database blank screen - by mwhitney - 01-28-2015, 10:32 AM
RE: load database blank screen - by dbui - 01-30-2015, 10:24 PM
RE: load database blank screen - by randy_rebucas - 01-31-2015, 12:27 AM
RE: load database blank screen - by noahsarkive - 02-18-2015, 08:32 AM
RE: load database blank screen - by medunes - 05-16-2015, 08:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB