mysql database on phpmyadmin
table_1: id, link
table_2: user_id, c_id
i have to store multiple values in c_id column in table_2 which
refer to id column in table_1
how to write UPDATE queries to add new values to c_id column
and also SELECT queries to access each c_id value and get link from table_1
also i need to write php APIs for the same
UPDATEqueries change existing rows in the database.INSERTis the query that adds new rows. This question does not seem to indicate much effort on the part of the asker. What have you tried, and what happened when you tried it?CONCAT, but the SELECT would be horrendously slow. Also, if you can't change the database structure, what data type is thec_idfield currently; you may not be able to store multiple values.