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

    Unanswered: SQL using mircrosoft access

    Can some one help me on the sql of access using php.
    My database website is sing MS access database but i can't find any books or example for that. All are base on MySQL.

    Can someone help me on the INSERT, UPDATE and DELETE query?
    The SELECT query i had already figured myself.

    Table: Profiles
    -ID (auto munber)(PK)
    -Name (text)
    -RankID (Number)
    -Date (Date/Time) eg. 28/03/2004
    -Time (Date/Time) eg: 22:15

    Can help me see what's wrong with my code?
    When to put the (') for the VALUES.
    here are my code:

    $squery_sql="INSERT INTO Profiles(ID, Name, RankID, Date, Time)
    VALUES( NULL, $Name, $RankID, $Date, $Time)";

  2. #2
    Join Date
    Mar 2004
    VALUES( NULL, '$Name', '$RankID', '$Date', '$Time')

    use the (') whenever you are inserting in datatypes like varchar, char, text, etc. you don't usually need it for any that deal w/ numbers

    for update:

    $my_update="UPDATE profiles SET colum_name_you_want_to_change WHERE id = 1";

    for delete:

    $my_delete="DELETE profiles WHERE id = 1"

Posting Permissions

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