I have received this error while inserting data.
Error Number: 1064
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 '( [website] => [business_contact] => [business_landline] => ' at line 2
Following is the query.
INSERT INTO `sp_business_details` (
Array (
[website] =>
[business_contact] =>
[business_landline] =>
[state] => 1
[state_name]=> Maharashtra
[district] => 1
[district_name] => Ahemadnagar
[city] => 1
[city_name] => Akole
[pincode] => 425001
[business_type] => 2
[business_subtype] => 2
[business_description] => A
[address] => A
[working_hrs_start] => 11:18 AM
[working_hrs_end] => 11:18 AM
[closed_day] => Sunday
[registered_from] => 1
[created_date] =>2018-04-18
)
) VALUES ('');
I am using codeigniter $this->db->insert
function. and passed the data array to this function
$q_businessdetails=$this->db->insert('sp_business_details',$sp_business_data);
var_dump($sp_business_data);o/p
string(686) "Array
(
[wbuser_id] => 153
[shop_name] => Moraya Computer Services
[shop_number] => 10
[website] => http://www.google.com
[business_contact] => 9403384505
[business_landline] => 2260676
[state] => 1
[state_name] => Maharashtra
[district] => 1
[district_name] => Ahemadnagar
[city] => 1
[city_name] => Akole
[pincode] => 425001
[business_type] => 1
[business_subtype] => 1
[business_description] => A
[address] => Adarsh Nagar Jalgaon
[working_hrs_start] => 11:18 AM
[working_hrs_end] => 11:18 AM
[closed_day] => Sunday
[registered_from] => 1
[created_date] => 2018-04-18
) "