Question Update With WHERE Querie problem

grabbetje

New member
Joined
Feb 23, 2015
Messages
4
Programming Experience
Beginner
Im having a question regarding the possibility to update a row in mysql database WHERE the row to update = the row that holds a "projectname" in a label that i retrieve from another table .
What im trying here is to use the "projectname" as a sort of foreign key to all my other tables in the database. So that each update in another table is pointed to the row with the correct projectname.

Im familiar with the normal UPDATE WHERE command but i have no clue how to make is like "UPDATE WHERE Label1.text = projectname in the table"


Thx for your help.
 
You're trying to turn this into something difficult when it's not. This IS the normal UPDATE command that you're already familiar with, i.e. you update a row or rows where a column contains a particular value. The column is `projectname` and the particular value is the String that you get from the Text of that Label. You have to get that String and pass that into the command though. The database doesn't know anything about your Label so you can't expect it to do it.
 
Back
Top