Questions tagged as 'mysql'

2
answers

Error in PROCEDURE [closed]

I'm new to creating PROCEDURE. I'm trying to create this PROCEDURE plus this error. DELIMITER // DROP PROCEDURE IF EXISTS 'P_lgs'; CREATE PROCEDURE 'P_lgs' ( idcod INT, dt VARCHAR(20), ip VARCHAR(20), msg VARCHAR(250), mail VARCHAR(250) ) BE...
asked by 15.06.2015 / 14:00
1
answer

Problem with accentuation HTML and MYSQL

I'm having a lot of problems with accentuation, first of all, I'm using WAMP Server. The charset of my site is UTF-8, that's why ISO-xxx ... it simply unconfigures all the accentuation of the HTML page, in other words, I have two fields in MySQL...
asked by 26.01.2015 / 18:04
2
answers

Converting text to C # number to write to DB

I'm using this conversion to get the string of txtvalor.text and transform it to a value like this: 1.500,80 curso.Valor = double.Parse(txtValor.Text); Example I type 1,500,80. And I'd like you to write to the database as well...
asked by 06.08.2014 / 20:38
1
answer

How to insert image into MySQL using Hibernate?

I'm using java with hibernate and would like to know how to insert an image into the mysql database. I have several information being persisted with hibernate, just missing the image.     
asked by 22.11.2014 / 16:43
2
answers

PHP function in_array ()

I'm developing a system that takes the category IDs that are stored in the database, separated by , , I'm using explode , turning them into a array and then I'm using the array_rand() to sort only one value of this arra...
asked by 20.11.2014 / 18:06
1
answer

insert in batches using pdo and transaction

Good morning guys, I'm kind of new to the world of php mysql and I'm in need of a help I am inserting data into my bd into 6 tables, the data comes from txt files Some files have 5000 rows with 163 records separated by; That's fine, I c...
asked by 22.08.2014 / 16:06
1
answer

Performance in dynamic menus

I am putting together a cakephp and mysql application, and would like to display some menus and items dynamically through the database. For example: View the latest updates, the latest database inserts, the menu with categories registered in...
asked by 11.06.2014 / 22:25
3
answers

Insert date into MySQL via PHP

I want to insert a FORM in HTML that made the field DATE , however it is in the format dd/mm/yyyy and mysql only accepts yyyy-mm-dd . How do I convert a date to insert correctly in MySQL database using PHP? I tried to find...
asked by 29.07.2014 / 17:03
2
answers

Error in mysql query in php

I have a query in DB mysql and it works fine, then I'm going to do the second query and it gives me the following error:    Warning: mysql_fetch_object (): supplied argument is not a valid MySQL result resource in C: \ xampp \...
asked by 03.07.2014 / 13:36
2
answers

___ ___ erkimt Error adding COUNT in CONCAT ______ qstntxt ___

When I try to add %code% it returns error, but when I shoot,% %code% works normal. Follows the error:

%code%

Script:

%pre%

I want to return this result:

%pre%

I followed this site:

  

link

Database:

TB_PEDIDO:

TB_ITEM_PEDIDO_PRODUTO:

TB_ITEM_PEDIDO_PRODUTO_INGREDIENTE:

TB_PRODUTO:

TB_PRODUTOS_INGREDIENTES:

TB_INGREDIENTES:

    
______ ___ azszpr34739

The Best Solution is to process it in the application, but if there is a reason to solve the SELECT, I suggest you use a sub-select the number of items in each product_no.

See if it works with the solution below:

%pre%     
______ ___ azszpr34733

Fields in aggregating functions as %code% % %code% %%% or co_de %code% should stay out of the clause %code% .

Try the following:

%pre%     
___

When I try to add COUNT it returns error, but when I shoot,% script works normal. Follows the error: Invalid use of group function Script: SELECT DISTINCT TB_PRODUTOS.ID_PRODUTO, CONVERT( GRO...
asked by 01.10.2014 / 14:11