Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP php import data from excel to mysql
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
php import data from excel to mysql
1 Answer(s)      3 years and 11 months ago
Posted in : PHP


php import data from excel to mysql


Advertisement
View Answers

May 14, 2012 at 2:50 PM


<?php

$connect = mysql_connect("localhost", "pramodh", "") or die("cant connect to mysql");
mysql_select_db("pramodh");
$fp = fopen("people.csv", "r");

while ($line = fgets($fp)) {
$char =  split("\t",$line,4); 
     list($name, $age,$height,$date) = $char;
  //Split the line by the tab delimiter and store it in our list
    $sql = "insert into people(name,age,height,date) values('$name','$age','$height','$date')"; // Generate our sql string
    mysql_query($sql) or die(mysql_error()); // Execute the sql
    //fclose($line);
}
?>


Related Tutorials/Questions & Answers:
php import data from excel to mysql
php import data from excel to mysql  php import data from excel to mysql
Import Excel file(date) into mysql database in php
Import Excel file(date) into mysql database in php  I try to import excel file which contains data date(yyyy-mm-dd) into mysql database in php. But it not insert the data in mysql. Code $fp = fopen("data.csv",'w'); fwrite
Advertisements
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??  How to import data from sql server table into an excel file by creating the rows dynamically
extract data from excel sheet to mysql
extract data from excel sheet to mysql  sir, i want to extract data from excel sheet and save the data in mysql5.0 database in the form of table
Import MYSQL file in PHP - PHP
Import MYSQL file in PHP  i wanted to import the mysql file in PHP5 on button click. is it possible to do it? Is there any possibility of data security
Fetch the data from mysql and display it on php form
Fetch the data from mysql and display it on php form  when i press on login button, after succesful login the related data of that person should be display in other textbox
how to import excel sheet into mysql database and save it as a table in database
how to import excel sheet into mysql database and save it as a table in database  sir, i want to import an excel sheet into a MySQL database and after importing it i want to store the excel sheet as a table in database
read data from Excel sheet
read data from Excel sheet  Hi, How to read data from an excel sheet using JSP. Thank you
how to retrive the particular data from database in php with mysql?
how to retrive the particular data from database in php with mysql?  ..._db("samp", $con); $Name=$_POST['unames']; $data=mysql_query("SELECT * FROM tbl... like this.. <?php $con = mysql_connect("localhost","root
create dropdown cell in csv or excell from mysql data in php
create dropdown cell in csv or excell from mysql data in php  Hello sir i want to create drodown cell in csv from mysql data is this is possible or not? if this is posible please share answer or reference link Thanks
Retrieving specific data from excel
Retrieving specific data from excel  Hello everyone, i have written a simple code to retrieve data from excel sheet and working fine, the excel file... first sheet from the workbook HSSFSheet sheet = workbook.getSheetAt(0
Function data from web in MS excel
Function data from web in MS excel  Hello, I would like to import data from one webpage to Excel using function Data - From Web. The problem is that this web page has at the end .jsp . When I open it via Excel, click to data
export data from database to excel sheet - JDBC
export data from database to excel sheet  I am facing a problem about exporting required data from database table to ms-excel sheet.i mean whenever I...("Data is saved in excel file."); rs.close(); connection.close(); } catch
Read Excel data using JSP and update MySQL databse
Read Excel data using JSP and update MySQL databse  HOw to read excel data using JSP and update MySQl database
read excel data from jsp - JSP-Servlet
read excel data from jsp  Hi how to read excel file from jsp? Excel file is created manually entered data having many sheets? and read the entire...)excel.jsp: Read And Edit Excel File  continue
reading data from excel file and plotting graph
reading data from excel file and plotting graph  I am doing a project... the data in excel file, i have to plot graphs based on CELL ID selected. please help... that reads an excel file using POI api and using the data of excel file
displaying data for a single column from Mysql database in the list box in php form
displaying data for a single column from Mysql database in the list box in php... in an listbox in php.thanks..   <?php $data = @mysql_query("select...; $data = @mysql_query("select * from names"); echo "Select a Name: n"; echo "<
displaying data from ms excel in form.
displaying data from ms excel in form.  Hi all, I have a requirement as mentioned below: Requirement: I have stored some data in the ms excel... in the column of the excel and also the mechanism to get this data and display
How to get data from Excel sheet - Struts
How to get data from Excel sheet  Hi, I have an excel sheet with some data(including characters and numbers). Now i want read the data from excel sheet and display in console first then later insert this data into database
Read data from Excel and insert in to DB and export data from DB to Excel
Read data from Excel and insert in to DB and export data from DB to Excel  Read data from Excel and insert in to DB and export data from DB to Excel Hi, I need to read the data from excel and I need to insert the same in to DB
how to display the data from excel to webpage
how to display the data from excel to webpage  Hi, I need help... that reads the excel file and store data into table. <%@page import="java.io.*"%>... search for the value 4024 in a excel file and to display the remaining values
Read data from excel file and update database using jsp
Read data from excel file and update database using jsp  read data from excel file and update database using jsp Hi, I am using a MySQL database for scientific research analysis. My team members sends research data in excel file
Export data in excel sheet via Browse and upload button into mysql database
Export data in excel sheet via Browse and upload button into mysql database  how to create a Browse & Upload Buttons and then save the information from it in mysql database's Table Am using struts2,hibernate for making
Uploading Excel sheet record in JSP to insert data in MySql
Uploading Excel sheet record in JSP to insert data in MySql  Need Help how to upload Excel (.xls) file and insert data in Mysql using JSP it wil be wonder for me if any help me
how to post data in mysql php form
how to post data in mysql php form  how to post data in mysql php form
swing application to import a object in a excel
swing application to import a object in a excel  Hi sir, I want to make a swing application where I can import a object in a cell of a excel... to do it. please help. The details of the excel operation which i want to do
retrieve data from mysql database
retrieve data from mysql database  hi am not familiar in php.....even... selected value on combobox which is to be retrieve the relevant data from mysql...;/html> retcombosearch.php form is <?php mysql_connect ("localhost
Retrieve Data from the database and write into excel file
Retrieve Data from the database and write into excel file. In this section, we are going to retrieve data from the database and write into the excel file...); fileOut.close(); System.out.println("Data is saved in excel file
Retrieve The Data From MySql Datbase
Retrieve The Data From MySql Datbase   How to Retrieve The Data From MYSQL database TO Use Select the Emp_id Option.And Also Search Option
How to export data from jsp to excel sheet by using java
How to export data from jsp to excel sheet by using java   How to export data from jsp to excel sheet by using java
How to export data from html to excel sheet by using java
How to export data from html to excel sheet by using java   How to export data from html to excel sheet by using java
Advertisements
 

 

 

DMCA.com