where does the data come from?
Main Topics
Browse All Topicshello, i have a PHP script that creates a table in mySQL.
QUESTION. how do i dump data into the database with the table?
below is my script.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Well, as said above, your question 'n concept is not clear. Still, with what I understand, you are a bit confused with a Table and a Database. Since you have mentioned MySQL, let me clear few things below. I am not sure whether you are desiring this or not.
(1) A MySQL database consists of tables where in you store records. After creating structure of your table, you need to fire Insert query to insert records in the table, that is what you are calling dumping. But, you are not dumping table, but you are inserting records in the tables which themselves reside inside the database.
For this, refer this link: http://www.w3schools.com/P
(2) A MySQL dump is actually a MySQL database backup.
For this refer this link: http://dev.mysql.com/doc/r
@Ray. thank you for that information.
---
@rpkhare.. sorry for the mix up.. i am looking for insert records.. not 'dump' them.
i have viewed the first link and tried to build the example in my script but was unsuccessful... Below is the entire PHP..
....starts on line 8 ...WHat am i doing wrong here? (everything else works EXCEPT the inserting of the test record.
i did not include my connection lines..
--
i inserted that and tested in browser.. it said this:
CREATE TABLE (id int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id),albumName varchar(100) default NULL,imageName varchar(100) default NULL,imageText varchar(100) default NULL)writing=Ok&problem creating directory
ok, let me start this over.. it is quite simple.. all i want to do is insert some data (record) into the created database.
THE ENTIRE SCRIPT BELOW WORKS FINE.
it does the following:
1) creates a table with the variabe
2) creates a directory on the server with the variable name.
---------------------
All i want to do is insert a record into the newly created table.
-----------------
DOE
I think alot of people get carried away on this site trying to show off their skills by suggesting over complex solutions.. it defeats the purpose of the person asking the question trying to learn.
>Where would I add the line to INSERT A RECORD?
with what data?
as in your other question, it looks like you want to create 1 table per album, instead of have 1 table (created once and for all), and insert 1 record/row into that table.
let's say you create the table with the name ALBUMS, with the same structure you showed.
Business Accounts
Answer for Membership
by: Ray_PaseurPosted on 2009-11-07 at 10:45:53ID: 25767503
Sometimes the question reveals some missing pieces of the knowledge foundation, and this is one of those times. This question might as well be, "Here is my propeller. How do I fly an airplane?" Let's see if we can get you onto a firm footing with PHP.
p
hp
ooks/phpmy sql4/
A really good starting place.
http://us3.php.net/tut.php
After that, please continue your study here:
http://www.php.net/docs.ph
Looking especially at this:
http://www.php.net/links.p
A really good book that will teach you the answer to this question and much more is available from SitePoint:
http://www.sitepoint.com/b
Best of luck with your project, ~Ray