Axeia Posted June 6, 2009 Share Posted June 6, 2009 I got 2 tables with near identical values, the first 3 fields are an exact match. The fourth (downloaded) is a boolean which is unique to the Checked table. Now I want move an entry from Downloads to Checked, do I really have to use 3 queries for this action? 1) INSERT INTO 2) Update the just inserted value to set downloaded to true 3) Remove entry from Downloads table. Seems odd to me, I thought something like the example below (which doesn't work) would be able to combine step 1 and 2. INSERT INTO Checked(date,filename,download,downloaded) SELECT date,filename,download,true FROM Downloads WHERE Downloads.download = :filename Quote Link to comment Share on other sites More sharing options...
Axeia Posted June 6, 2009 Author Share Posted June 6, 2009 Ah my bad, goes perfectly fine, just need to use 1 instead of true with mysql not knowing booleans and all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.