Jan 23rd, 2003, 07:39 AM
#1
Thread Starter
Lively Member
SQL command
hi
i have an SQL file i attached with the message
how can i make a php file that add that SQL commands to a db
dbhost = "localhost"
dbname="tnen"
dbuser="t"
dbpass="t"
can you make the php file for me please
Attached Files
Jan 23rd, 2003, 10:03 AM
#2
Frenzied Member
wel without looking at the file I will suggest you read teh mysql manual and the php manual and do it yourself, or at least try.
to insert
"INSERT into Table (id,name,email) values('',$name,$email) "
to select
"SELECT * form table"
to update
"UPDATE table set name=$name, email=$eamil where id=$id"
understand? you won't find anybody to do it for you but we are very willing tohelp you.
Jan 24th, 2003, 04:28 AM
#3
Thread Starter
Lively Member
if you looked at the file you will see a lot of lines of sql commands
so if i want to make them like you say i think i will never finish
is there any way that i can add in the php code the name of the file (sql file) and the code do those commands
Jan 24th, 2003, 08:50 AM
#4
Frenzied Member
install a program called phpMyAdmin and you can upload that file into that program and it will do it for you. the program works off the web so it will be easy. it is located here http://www.phpmyadmin.net/
Jan 24th, 2003, 01:01 PM
#5
Thread Starter
Lively Member
look i have phpmyadmin but i want to make a special php file
Jan 24th, 2003, 01:23 PM
#6
Frenzied Member
look, why re-invent the wheel.
it won't be so special if all you have to do is connect to the db and then use mysql_query on all those creates and inserts, that is all. And you would have even found that out fi you would have read the mysql or php manual......
Jan 24th, 2003, 04:29 PM
#7
Thread Starter
Lively Member
Look phpman i have no time to read php manual or other
and i am asking for a help here
can any one help me
Jan 24th, 2003, 04:53 PM
#8
Frenzied Member
no I guess not, you would just rather waste a day or more arguing it on here . now that took me a whole 10 minutes with find/replace and added what I told you in one of my posts.
now change you db info at the top and should be good to go
rename to .php istead of .txt
Attached Files
Jan 24th, 2003, 07:39 PM
#9
Stuck in the 80s
Originally posted by Tnen
Look phpman i have no time to read php manual or other
and i am asking for a help here
can any one help me
Give me a car and a house. I don't have time to work and earn money. Just give it to me.
That's not how the world works, chap.
Jan 30th, 2003, 12:39 PM
#10
Frenzied Member
and see, you help the guy out and what do you get....NOTHING.
and you wonder why people don't write code for anybody, you have to learn it.
don't expect to get any more help from us, or me at least, in the future....
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width