thenature4u Posted February 11, 2008 Share Posted February 11, 2008 culd you explain the code for insertind data from text file into mysql database using php. ex: data.txt this file contains below details. name:XXX office: mobile: email:s@g.com name:XXX office: mobile: email:s@g.com name:XXX office: mobile: email:s@g.com these details insert into database table structure is( name office mobile email) please explain this Quote Link to comment Share on other sites More sharing options...
yandoo Posted February 11, 2008 Share Posted February 11, 2008 Hi there, This is basic notepad file of a User table and records that are inputed auto via phpmyadmin but includes the creation of the tables as well.... You should hopefully be able to reverse engineer it... -- phpMyAdmin SQL Dump -- version 2.10.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 05, 2008 at 07:59 PM -- Server version: 5.0.45 -- PHP Version: 5.2.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `woodside` -- -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `id` int(4) NOT NULL, `FirstName` varchar(25) NOT NULL, `LastName` varchar(25) NOT NULL, `Age` int(3) NOT NULL, `Hometown` varchar(25) NOT NULL, `Job` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`id`, `FirstName`, `LastName`, `Age`, `Hometown`, `Job`) VALUES (1, 'Peter', 'Griffin', 41, 'Quahog', 'Brewery'), (2, 'Loise', 'Griffin', 40, 'Newport', 'Piano Teacher'); Unless i have gotthe wrong end of the stick here???? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.