とのデータベースに接続するために with を使用してCodeigniter
います。Grocery Crud
MySQL
PhpMyAdmin
チュートリアルにあるようにすべてをインストールしましたが、常にエラーが発生する可能性があります。
私の問題は次のとおりですvarchar (255)
。最初の2つと生年月日に使用する単純なテーブル(名前用、姓用、生年月日用の3つのフィールド)DATE
があります。新しいレコードを追加するか、既存のレコードを更新すると、ジョブが正常に実行されたと表示されますが、実際には実行されませんでした。そして、DATE
フィールドのみ。他の 2 つの列を完全に追加および更新できます。
何か案は?
編集:要求されたとおりにコードを追加しました。これはController
、患者を取得する です。
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
class GetPatients extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');
}
public function index()
{
echo "<h1>Welcome to the world of Codeigniter</h1>"; //Just an example to ensure that we get into the function
die();
}
public function dbpatients()
{
$this->grocery_crud->set_table('patient');
$output = $this->grocery_crud->render();
$this->_example_output($output);
}
function _example_output($output = null)
{
$this->load->view('patients_view',$output);
}
}