En cours

Insert CSV .txt into MySQL Database using PHP

Write PHP code to insert the attached CSV .txt file data into the below MySQL table. Feel free to offer suggestions to better optimize this table too ! (There is no need for you to write the database connection as I will insert the necessary code to connect to my database.)

The insert PHP script will be run nightly using a cron job.

Also, could you please provide the PHP snippet I would use to take the options and images fields and list their items separately. For instance: in options the items are separated by commas. (radio, CD-player, leather interior) and I would want to be able to print that in a unordered list. So for each item put it into a <li>ITEM</li>

MySQL table is as follows:

CREATE TABLE IF NOT EXISTS `cars_for_sale` (

`VIN` varchar(22) NOT NULL default '',

`StockNumber` varchar(10) default NULL,

`Make` varchar(20) default NULL,

`Model` varchar(20) default NULL,

`ModelYear` smallint(4) default NULL,

`Trim` varchar(20) default NULL,

`BodyStyle` varchar(20) default NULL,

`Mileage` smallint(6) default NULL,

`EngineDescription` varchar(25) default NULL,

`Cylinders` varchar(20) default NULL,

`FuelType` varchar(20) default NULL,

`Transmission` varchar(20) default NULL,

`Price` smallint(6) default NULL,

`ExteriorColor` varchar(20) default NULL,

`InteriorColor` varchar(20) default NULL,

`Options` varchar(5000) default NULL,

`Description` varchar(5000) default NULL,

`images` varchar(10000) default NULL,

PRIMARY KEY (`VIN`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Compétences : MySQL, PHP

Voir plus : insert csv mysql, php script null, php free code, php create table, php mysql connection, mysql database free, free radio code, create table php, create php code, code php free, php txt mysql, mysql free, free mysql, write php mysql, txt, trim, transmission, snippet, php script create table, php radio, optimize mysql, null, interior free, insert, free php code

Concernant l'employeur :
( 89 commentaires ) Dubai, United Arab Emirates

N° du projet : #1033716

Décerné à :

bestphpjobs

I can do this very well @@ check PM @@

40 $ USD en 0 jours
(19 Commentaires)
3.8