我正在尝试从两个不同的日期获取月数。我正在使用codeigniter php,我在很多地方看到我使用的代码应该可以工作,但我得到了一个错误。 public function check($token){
if ($this->input->is_ajax_request()){
$id = $this->myajax->getUserByAuth($token);
if ($id){
$this->load->model('user_profile');
$result = $this->
我有input type = "date",允许用户选择一个日期范围来运行查询并在表中显示。但是,当我从分页中单击Page 2时,会丢失日期值,并且查询不会使用选定的日期进行搜索。如何保持要运行WHERE子句的查询值。
我的财务主任:
public function searchDate()
{
$this->load->library('session');
if ($this->input->post('search')) {
$this->session->set_us
当我试图使用mysql在数据库中插入时间时,我遇到了一个问题:
数据库错误地存储日期,如您所见:
列类型为时间戳。
在我的代码中(为此我使用PHP和codeigniter 4),我有一个字符串日期,但是保存日期的字段的类型是时间戳。
$fecha = strtotime($pedido['fecha_creacion']); //Get the date from string and converting it to timestamp
$dbventor->query("INSERT INTO tfacpeda(FECHA)VALUE