User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,228 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,279 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

MySql insert

Join Date: May 2008
Posts: 3
Reputation: mike.prinsloo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mike.prinsloo mike.prinsloo is offline Offline
Newbie Poster

Re: MySql insert

  #3  
May 9th, 2008
It might help to post the error here as well.

Notice that you are trying to INSERT two values, id and message, but you are only SELECTING one value, id. Your query should look something like the following:

INSERT INTO table2(id, message) SELECT id, message FROM table1 WHERE some_condition
Reply With Quote  
All times are GMT -4. The time now is 3:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC