Results 1 to 10 of 10

Thread: SQL command

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Posts
    106

    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 Attached Files

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Posts
    106
    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

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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/

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Posts
    106
    look i have phpmyadmin but i want to make a special php file

  6. #6
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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......

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Posts
    106
    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

  8. #8
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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 Attached Files

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    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
  •  



Click Here to Expand Forum to Full Width