Questions tagged as 'mysql'

2
answers

MySQL error "expects parameter 1 to be resource, boolean given in"

$query = "Select * from servico where ID_SERVICO = $id"; $result = mysql_query($query); if($row = mysql_fetch_array($result)) { $nome = $row['NOME']; if($nome == 'Marketing') { include ("servicos/marketing.php"); }...
asked by 07.08.2014 / 19:13
1
answer

Error 'Duplicate entry' 1 'for key' PRIMARY '"

I'm not sure how to do this, but I'm not sure how to do this. Duplicate entry '1' for key 'PRIMARY' Using the following code: mysql_query("INSERT INTO vendaproduto (id, id_venda, produtos) SELECT venda.id_venda, venda.id_venda, venda...
asked by 14.12.2015 / 13:59
0
answers

Export tables to CSV strange characters

When I export a table to CSV in MySQL Workbench, it has strange characters due to accent. Is there a way to resolve this? And also, how can I select all the tables I want and export to different CSV files (one for each table)? Thank you!...
asked by 24.06.2016 / 22:04
2
answers

Update command does not update table

I have a problem with my CRUD. My code looks in the DB and returns the data to the screen correctly, the problem that when I save it, it does not update the DB and it also does not display any error messages. Here is the code for the data pag...
asked by 13.06.2016 / 13:22
1
answer

Return database records using jquery ajax, php and mysql

I'm a beginner in jquery and would like some help for the following situation: In this field: <input type="text" name="colaborador" id="colaborador"> How would you do where, for each letter you typed, you run a query in the databas...
asked by 04.07.2016 / 22:42
1
answer

Assign an article in more than one category php

I have to insert a database in the database assigned to more than one category, how could I do this? In case it would appear the category options available in my bank and I would select them with a checkbox     
asked by 07.07.2016 / 19:10
0
answers

Logic. Company with 2 stocks

I have the following Mysql table: 'estoque_itensconsumo' ( 'cod_itensconsumo' INT NOT NULL AUTO_INCREMENT, 'unidade_mendida' VARCHAR(45) NULL, 'estoque_atual' INT NULL, 'quant_minima' INT NULL, 'valor_custo' FLOAT(9,2) NULL, 'registrar_cliente...
asked by 06.06.2016 / 22:16
0
answers

SQL error in your SQL syntax

I'm importing an sql with the following code: CREATE TABLE blog ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(250) NOT NULL, body TEXT NOT NULL, url VARCHAR(250) NOT NULL); But you are returning the following error:    Notice in ./i...
asked by 06.06.2016 / 17:57
0
answers

Error in PHP PDO Class

I'm trying to use the PDO class on one of my systems and this error is showing up, and the PDO class is already installed. Fatal error: Class 'PDO' not found in /home/dfmedica/public_html/cursos/classes/BD.class.php on line 9 Connection cla...
asked by 02.06.2016 / 20:03
1
answer

Get BD Rows (MySQL) - WebService Mysql C #

I'm having trouble getting the rows . It does not recognize any variables within cmdMySQL ( @Login ). I tried to put others but nothing if I take the @Login and put the value of email that is in the BD he usually t...
asked by 03.06.2016 / 03:26