Questions tagged as 'mariadb'

1
answer

How to use implode with arrays obtained from Mariadb PHP columns?

Hello, I am trying to return an array for each column of a query where it meets a condition where, and to each element of the array of each column add a ',' but I can not find how to do it, I leave my code: $sql = "SELECT producto, unidad, can...
asked by 05.10.2017 / 08:30
1
answer

Error in Jquery DataTable "Requested unknown parameter '0' for row 0, column 0."

Good people, I have been presented with this error and I have not been able to solve it, I hope you can help me: This is my PHP code in which I get my DB records      include ("conexion.php"); $query = "SELECT * FROM ciclos;"; $resultado =...
asked by 09.08.2017 / 17:51
2
answers

Error creating foreign key in MariaDB

I have the following 3 tables: CREATE TABLE tEstado (idEstado INT NOT NULL AUTO_INCREMENT, Estado VARCHAR(100) NOT NULL, PRIMARY KEY(idEstado), INDEX(idEstado))ENGINE=INNODB; CREATE TABLE tMunicipio (idMunicipio INT NOT NULL AUTO_IN...
asked by 04.03.2017 / 22:49
2
answers

sql problem in php

I have a problem in the trend of SQL in PHP $where = ''; $sTable = "clientes"; $type = 'client(1);'; $usid = $_COOKIE['c_user']; $where = "";; if($_GET['q']!= "" ){ $where.= " WHERE fullname like '%$q%' AND user_id=1 "; } $whe...
asked by 21.01.2017 / 21:23
2
answers

Problem with NOT EXISTS in SQL

I have a problem with a query in SQL. I have my table pedidos that has the fields numero pedido , fecha recepción and código cliente and I need to generate a list of the clients that have not placed orders in a certain...
asked by 11.11.2016 / 02:35
1
answer

Error: SQLSTATE [42000]: Syntax error or access violation: 1064

I get an error when wanting to generate an action like modify or save . Error:    SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server ve...
asked by 15.12.2016 / 07:43
1
answer

How to export code lines to a .sql file

I have created a database, in mariadb, I need to save in my .sql file my database and the code lines I use to create it, for example if I did: CREATE TABLE ejemplo ( id VARCHAR(20), x INT, PRIMARY KEY ( id,x ) FOREIGN KEY x REFERENCES otratab...
asked by 03.08.2016 / 23:16
1
answer

Relationships in my database

I have a doubt as to which 3 tables would do practically the same, Save the urls of where the files are located I have a table called Groups - where you can save files, in general it's just uploading files. And already in their respective gro...
asked by 20.11.2018 / 04:04
0
answers

How to perform JSON searches created with MySQL

I have to do a lot of searches in a SQL table, so it occurred to me to do 1 single selected query and save it in a JSON like this: SELECT json_object('id', Id, 'nombre', nombre) FROM etiquetas What I do not know, is how to search inside tha...
asked by 14.09.2018 / 03:08
0
answers

Error calling a stored procedure (MariaDB) with parameter in Laravel 5.6

I have not managed to execute a stored procedure with parameter. Specifically I get this error: "SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB...
asked by 04.10.2018 / 23:18