ممنون دوست عزیزم من برای تست دانلود کردم و استفاده کردم اما بهش به مشکل خوردم
کدهام رو در زیر میذارم و پیام خطایی که میده
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Demo extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('grocery_CRUD');
}
public function index()
{
}
public function employees_example()
{
$crud = new grocery_CRUD();
$crud->set_table('sj_news_news');
$output = $crud->render();
//$this->_example_output($output);
}
function _example_output($output = null)
{
$this->load->view('example.php',$output);
}
}
/* End of file main.php */
/* Location: ./application/controllers/main.php */
?>
تنظیمات دیتابیس در فایل config/database.php
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'mysql:host=localhost;dbname=news;';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'news';
$db['default']['dbdriver'] = 'pdo';
$db['default']['dbprefix'] = 'sj_';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
و خطایی که میده
Error Number: 42000
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1 FROM sj_news' at line 1SELECT TOP 1 FROM sj_newsFilename: C:\xampp\htdocs\ci\system\database\DB_driver.phpLine Number: 331