Skip to content

Tag: mysql

MySQL foreign characters after inserting data

I’m using php to insert data from inputs into MySQL database. The problem is, it shows up in phpmyadmin as foreign characters. I’ve already set my database to utf8_hungarian_ci as you can see here: https://i.gyazo.com/aeca91e44e8f1808bad09584d8e938d7.png I’m using utf 8 charset in my form: a…

Roles and permissions in php

I am making a menu, but I want to limit it to only some users with a specific permission can see it. the query: SELECT idpermission,userid FROM user_permissions WHERE userid = “U001” Result: User …

MySQL Update with 2 conditions

In my table I have some rows with same ‘stock_id’, and need update with 2 conditions, but don’t work, just update all rows with value 1 $this->db->query(‘UPDATE stock_table SET size = IF(kit = …

How to parse json array from mysql?

I have this data but I can’t parse it in the way I want. this is what I get: { “navigations”: { “title”: “Facebook”, “link”: “https://facebook.com”, “behavior”: “EXTERNAL” } } And …