skip to Main Content

Mysql – SELECT INTO always getting same ID

I have a Stored Procedure which takes as input a JSON List String in the following format: [{"NOME":"Teste Produto, produo3 AAAAAAAAAAAAA","SKU":"ITAPE000011","IMG":"https://image.com","DESCRICAO":"Produto com total garantia","NCM":"90069190"},{"NOME":"NOV PRODUto dadsad","SKU":"ITAPE006666","IMG":"https://image.com","DESCRICAO":"Produto cadastrado novo","NCM":"85181090"},{"NOME":"Virgula,Produto, produo3 BBBBBBBBBBBBBBB","SKU":"ITAPE445566","IMG":"https://image3.com","DESCRICAO":"Produto Novo","NCM":"12345690000"}] And inside this proc, I'm trying to use two…

VIEW QUESTION

MySqlConnector – Parameter in dynamic string query won't be set

@pname is the parameter set in C# code by: using (MySqlCommand dynamicQueryCommand = new MySqlCommand(dynamicQueryWithParameter, conn)) { dynamicQueryCommand.Parameters.Add("@pName", MySqlDbType.String); dynamicQueryCommand.Parameters["@pName"].Value = "John"; using (MySqlDataReader dynamicQueryReader = dynamicQueryCommand.ExecuteReader()) { string output = ""; object[] values = new object[dynamicQueryReader.FieldCount]; while (dynamicQueryReader.Read()) {…

VIEW QUESTION

Mysql – Poor performance of sort by timestamp with limit query

I have a simple MySQL table which consists of a primary key ID field, a timestamp (integer) field, and a foreign key ID field (device_id). There are indexes on each of these columns: mysql> show indexes from device_heartbeats; +-------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ |…

VIEW QUESTION

How to insert UTF8 character with MySQL/MariaDB

I want replace in a column a string of characters with UTF8 characters, using REGEXP_REPLACE and/or REPLACE. $search = mysqli_real_escape_string($id_mysql, $_POST['search']); $new = mysqli_real_escape_string($id_mysql, $_POST['new']); mysqli_query ($id_mysql, "UPDATE table_name SET column_name = REGEXP_REPLACE(column_name, '$search', '$new') WHERE column_name REGEXP '$search'" )…

VIEW QUESTION
Back To Top
Search