SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    845
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Error: 1142 INSERT command denied to user

    The user I am using is the same for both databases, yet I am getting this denied error message. I can do a simple insert into each database, I just can't insert into one from the other. Here is my insert query:

    INSERT
    INTO convert2silver.people
    ( IPaddress
    , dateAdded
    , firstName
    , lastname
    , city
    , state
    , zip
    , country
    , email
    , career
    , referURL)
    SELECT IPaddress
    , date
    , firstname
    , lastname
    , city
    , state
    , zip
    , country
    , email
    , member
    , referURL
    FROM oils.users
    WHERE wantSilver = 'Yes';

    What am I missing here?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,909
    Mentioned
    96 Post(s)
    Tagged
    0 Thread(s)
    In the WHERE CLAUSE you should use table_name.wantSilver replacing table_name with the actual name of the table.

    Are you are the two tables involved in separate databases?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator


Bookmarks

Posting Permissions

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