php - Inserting data into first empty column cell without creating a new row -
i want add data table, 1 column @ time. therefore don't want add new row, column i'm adding may not have data in compared other columns. result suppose want add data first empty cell in specified column without adding new row whole table (as there may enough rows).
my table has 5 columns.
i'm using:
$sql=("insert [my_table] ([my_column]) values ('[my_data]')");
please assist correct code? know it's basic stuff i'm new mysql.
thanks in advance.
so can use update
statement where
condition target specific row
update table_name set column_name = 'whatever' column_name = '' , id = '1'
if want update rows column blank use
update table_name set column_name = 'whatever' column_name = ''
no need of using id in above query
Comments
Post a Comment