SQL Insert Query is Fine ! But can't store data in Mysql in PHP? -


all code working fine !!!!
data storing in table can't store in table. !!!
seems structure of table wrong !!!
please review query , table structure, maybe structure wrong !!!

this insertion query, through insert data database !!!

except table, saves in every other table, structure of table different 1 !!!

insert query !!!

$insert = "insert companey (name,city,cell,phone,fax,adress,service,subservice1,subservice2,email1,email2,email3,lat,lng,img1,category,description,company_url,rurl,password,recomend,img2,img3,img4,img5,img6,ser,subser,reserve,ask,appoin) values ('$name','$city',null,'$phone',null,'$adress','$scat1',null,null,'$email',null,null,'$lat','$lon',null,'$cate',null,null,null,'$password',null,null,null,null,null,null,null,null,null,null,null)"; $insert_run = mysqli_query($conn , $insert); if($insert_run){   echo "<script> alert('company insert successfully') </script>"; } else{      echo "<script> alert('company not insert successfully') </script>";  } 

sql table structure

-- -- database: `critica_critica` --  -- --------------------------------------------------------  -- -- table structure table `companey` --  create table `companey_info` (   `id` int(30) not null,   `name` varchar(33) not null,   `city` varchar(33) not null,   `cell` varchar(33) not null,   `phone` varchar(33) not null,   `fax` varchar(33) not null,   `adress` varchar(33) not null,   `service` varchar(33) not null,   `subservice1` varchar(33) not null,   `subservice2` varchar(33) not null,   `email1` varchar(33) not null,   `email2` varchar(33) not null,   `email3` varchar(33) not null,   `lat` varchar(33) not null,   `lng` varchar(33) not null,   `img1` varchar(33) not null,   `category` varchar(33) not null,   `description` varchar(250) not null,   `company_url` varchar(33) not null,   `rurl` varchar(30) not null,   `password` varchar(33) not null,   `recomend` varchar(33) not null,   `img2` varchar(33) not null,   `img3` varchar(33) not null,   `img4` varchar(33) not null,   `img5` varchar(33) not null,   `img6` varchar(33) not null,   `ser` varchar(33) not null,   `subser` varchar(33) not null,   `reserve` varchar(33) not null,   `ask` varchar(33) not null,   `appoin` varchar(33) not null ) engine=myisam default charset=utf8;  -- -- dumping data table `companey` --  insert `companey` (`id`, `name`, `city`, `cell`, `phone`, `fax`, `adress`, `service`, `subservice1`, `subservice2`, `email1`, `email2`, `email3`, `lat`, `lng`, `img1`, `category`, `description`, `company_url`, `rurl`, `password`, `recomend`, `img2`, `img3`, `img4`, `img5`, `img6`, `ser`, `subser`, `reserve`, `ask`, `appoin`) values (3, 'oxelösunds rör ab', 'oxelösund', '0155-304 25', '000444', '0155-304 79', 'torggatan 24 61330 oxelÖsund', 'rör, rördelar, sanitetsgods - d', 'rörarbeten, vvs', 'värmepumpar, -växlare, -regulat', 'info@ox-ror.se', 'carolina@ox-ror.se', 'mehtabjani4310@gmail.com', '58.6673741', '17.1064219', 'chrysanthemum.jpg', 'badrum', 'this , company belong if need andfjks jfksadjf kjfkasdfj d', 'https://www.reco.se/', 'http://www.kaknastornet.se/om-', 'bz+ko,#a', '', 'errornext.png', 'desert.jpg', 'dahlstore1.jpg', 'dahlstore1.jpg', 'dahlstore1.jpg', '', '', 'on', '', ''), (4, 'insulander ab, byggnadsfirma g', 'strängnäs', '0159-35 00 60', '070-834 30 52', '', 'vältstigen 4 64541 strÄngnÄs', 'kakel, klinker ', 'byggmästare, byggnadsentreprenö', 'fasader', 'info@insulandersbygg.se', '', '', '59.3506313', '17.031865', '', 'badrum', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');  -- -- indexes dumped tables --  -- -- indexes table `companey` -- alter table `companey`   add primary key (`id`);  -- -- auto_increment dumped tables --  -- -- auto_increment table `companey` -- alter table `companey`   modify `id` int(30) not null auto_increment, auto_increment=647; 

table name companey_info , trying insert in companey.

check once.

and if it's issue resolve using proper table name.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -