MySQL error code: 1175 during UPDATE in MySQL Workbench

I’m trying to update the column visited to give it the value 1. I use MySQL workbench, and I’m writing the statement in the SQL editor from inside the workbench. I’m writing the following command: UPDATE tablename SET columnname=1; It gives me the following error: You are using safe update mode and you tried to … Read more

Which MySQL data type to use for storing boolean values

Since MySQL doesn’t seem to have any ‘boolean’ data type, which data type do you ‘abuse’ for storing true/false information in MySQL? Especially in the context of writing and reading from/to a PHP script. Over time I have used and seen several approaches: tinyint, varchar fields containing the values 0/1, varchar fields containing the strings … Read more

Can I concatenate multiple MySQL rows into one field?

Using MySQL, I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id = 5; My Output: shopping fishing coding but instead I just want 1 row, 1 col: Expected Output: shopping, fishing, coding The reason is that I’m selecting multiple values from multiple tables, and after all the joins I’ve got a lot more … Read more