我有一个选择框,可以选择“非常低”、“低”、“中”、“高”和“非常高”,可以在 0-19、20-39 等到 100 之间进行选择。
模型:
if ($this->input->post('interest_rating') != "")
{
$range = explode($this->input->post(' ','interest_rating'));
$this->db->where('webinar_event.interest_rating >= ', $range[0]);
$this->db->where('webinar_event.interest_rating <= ', $range[1]);
}
我得到 2 个单独的错误
1)
A PHP Error was encountered
Severity: Warning
Message: Wrong parameter count for explode()
Filename: models/hp_model.php
Line Number: 128
A Database Error Occurred
Error Number: 1064
2)
您的 SQL 语法有错误;查看与您的 MySQL 服务器版本相对应的手册,了解在'AND
webinar_event .
interest_rating附近使用的正确语法<=' at line 5
SELECT * FROM (`health_professional`) JOIN `webinar_event` ON `webinar_event`.`hpid` = `health_professional`.`hpid` WHERE `webinar_event`.`interest_rating` >= AND `webinar_event`.`interest_rating` <=
文件名:D:\Development\PfizerWebinar\web\system\database\DB_driver.php
行号:330
任何帮助将不胜感激,谢谢