User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 373,100 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 3,771 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 MySQL advertiser:

sql "insert into" question

Join Date: Jul 2007
Posts: 33
Reputation: linux0id is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
linux0id's Avatar
linux0id linux0id is offline Offline
Light Poster

sql "insert into" question

  #1  
Mar 26th, 2008
Hello everyone!
I am writing a music database, and I need to insert into album table the path to its cover. However, not every album has a cover in its directory, so I've made an algorithm that only gets the albumID that has a cover. My question is - how can I insert value into one column in a row with a specific ID (or name)? I have tried this -
"insert into albums (cover_path) values ('%s') WHERE albumID=%d"
but it sais that theres an error at WHERE. How can I do this? I am using sqlite3 and C++. Thanks!
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 5:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC