Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: SQL error!! Please help me.

    The books i had are all on SQL database with PHP.
    I had a problem creating the SQL as i'm using MS access.
    Can someone help me out?

    My code looks like this.


    function sql($conn, $Name)

    $sql="INSET INTO Profiles ( [ID], [Name], [Date], [Time])
    VALUES ( 'NULL', '$_POST[$Name]', 'date_now', 'time_now')";
    I had an error when running this script.

    ID is a field in the Access database which is atuo number.

    Can someone pls kindly help me the sql satement: INSERT, UPDATE and DELETE.
    By the way where can i get to learn the SQL for microsoft access for PHP. Any webites to inroduce.

    Very thank you!!

  2. #2
    Join Date
    Jun 2003
    I dont use msaccess, so I probably can't help you too much, but I can see somethings that are wrong with your code.

    First of all, your code says "INSET" not "INSERT" (typo im assuming) second of all, you are just putting that stuff into the variable "sql" you need to have another function (im not sure what because I dont use msaccess) to actually process the data and put it into the database. With MySQL databases it would be mysql_query($sql).

    I also just noticed that you have brackets around the colums ([ID]...
    Try taking those out, because I know when you use mySQL databases you don't need those.

    I hope that gets you started. Im sure you could try a search on google to find more.
    Mr. Lars

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts