I need to update 3 fields in a mySQL database table programmaticaly. I need to update label_id, label & company_id
What I need is an SQL query that allows me to indicate what the company_id is and the "label" fields and then have it generate the label ids automatically.
For example, create label="test", company_id="17"......and have it automatically generate the label_id. Any ideas on an sql query to do this? Table structure example:
label_id label company_id 1 Cook 8 2 Chef 8 3 Driver 9
UPDATE yourtable SET field=value, field=value WHERE field=value?