dAivEd Posted February 21, 2009 Report Share Posted February 21, 2009 INSERT INTO `kautkas` ( `x_id` , `x_id` , `price` ) VALUES ( 'x', '01', '0.0000' ) WHERE user_id != '0' Kapec vinsh lamajas uz WHERE ?, ja man vajag visiem id to uzlikt ? Quote Link to comment Share on other sites More sharing options...
codez Posted February 21, 2009 Report Share Posted February 21, 2009 izmanto UPDATE Quote Link to comment Share on other sites More sharing options...
dAivEd Posted February 21, 2009 Author Report Share Posted February 21, 2009 ka es varu vinus update, ja vini man nav ieksh datubazes ? man nosakuma insert jauztaisa. Quote Link to comment Share on other sites More sharing options...
bubu Posted February 21, 2009 Report Share Posted February 21, 2009 Ja jau tu gribi ielikt informāciju datubāzē, tad kāpēc tu gribi to WHERE, jo tas jau attiecas tikai uz informāciju, kas jau ir ielikta datubāzē (UPDATE kverijā) ? Quote Link to comment Share on other sites More sharing options...
codez Posted February 21, 2009 Report Share Posted February 21, 2009 Bet, ja viņi nav datubāzē, tad kā tu vari zināt, ka viņiem user_id != 0? Quote Link to comment Share on other sites More sharing options...
Gints Plivna Posted February 21, 2009 Report Share Posted February 21, 2009 Savukārt par Insert vari palasīties arī šeit, kad var where lietot un kad nevar. Pie tam Tev arī 2reiz vienā un tai pašā kolonā tiek liktas dažādas vērtības, kas nav korekti arī bez visa WHERE. Gints Plivna http://datubazes.wordpress.com 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.