Posts by Cristiano Cardoso Silva • 356 points
28 posts
-
0
votes2
answers49
viewsQ: Error running mysql php query
I am getting the following error while executing the query 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'protetic_sistema.cad_trabalho.id_trabalho'…
-
0
votes0
answers34
viewsQ: How to mount a select from DB
Good afternoon, personal my doubt and the following I have a database that lists me all the dates of delivery of works as follows 2016-07-13 2016-07-01 2016-03-09 2015-09-09 2013-03-06 how do I…
-
0
votes3
answers646
viewsQ: pass checkbox values to the url
Good afternoon, Personal I am with a doubt in how to make to pass the selected items of a page for a URL to send a report all the code already working nicely only missing that part. example item…
phpasked Cristiano Cardoso Silva 356 -
0
votes1
answer48
viewsQ: Create a Three Table Viewer
How to create a view in mysql with 3 tables being the following structure cliente |id_cliente |nome_cliente produto |id_produto |nome_produto |valor_produto pedido |id_pedido |id_produto |id_cliente…
-
2
votes1
answer97
viewsQ: Issue Statement of Services
Good afternoon staff I am trying to issue a statement of services from my record. follows my database CREATE TABLE `cad_cliente` ( `id_cliente` smallint(5) UNSIGNED NOT NULL, `nome_cliente`…
mysqlasked Cristiano Cardoso Silva 356 -
1
votes1
answer250
viewsA: sum of PHP and Mysql values
Staff managed to settle with the following SELECT SELECT (SELECT SUM(IF(debito_credito_financeiro = 'C', valor_financeiro, -valor_financeiro)) FROM cad_financeiro WHERE…
-
0
votes2
answers4855
viewsQ: How Select SUM(',''',''''')
Personal I’m just with a doubt, about how the mysql select works. Select SUM(IF('','','')) I’m using it but I don’t really know how it works
-
0
votes1
answer28
viewsQ: Mysql ambiguous error
I’m having an error in my Select SELECT *, SUM(IF(debito_credito_financeiro = 'D', valor_financeiro, 0)) AS debito, SUM(IF(debito_credito_financeiro = 'C', valor_financeiro, 0)) AS credito, (SELECT…
-
1
votes1
answer250
viewsQ: sum of PHP and Mysql values
Good afternoon, Friends I am creating here a system of notinhas to use in the company it is very basic, but I am doubtful on how to set up the payment function so that it identifies the values some…
-
1
votes1
answer37
viewsQ: Shows how $query looks
Guys I’ve seen it working somewhere but I can’t remember where. And the next I want to give a echo in my code and display how was the Mysql type Insert $query1 = $conn->query("INSERT INTO dados1…
-
1
votes1
answer197
viewsQ: How to work with if and Else?
Good morning. I would like to get help from you to build this code because I am not able to implement it. $query1 = "INSERT INTO paciente VALUES ('NULL, $nome_paciente, $nome_doutor')"; $id_paciente…
-
1
votes2
answers250
viewsQ: Save data to various tables
I am making a registration system and would like a help from you to be able to save the data in several tables. My registration is composed by the following fields. Nome do Paciente Nome do Doutor…
-
-2
votes1
answer88
viewsQ: Fix Sum result php mysql
Code used to obtain the result <?php $total = 0; while($row = mysql_fetch_object($trabalho)) { $total += $row->valor; echo…
-
0
votes3
answers87
viewsA: Fix data from SQL database
I got it with the following code update cad_recibo SET valor_recibo = REPLACE(valor_recibo, '00.00', '.00'); only that if it has some value with pennies does not change. then I wanted some way to…
-
0
votes3
answers87
viewsQ: Fix data from SQL database
I want to correct a table field, because I have values like this: 123456789 and I want to change to 1234567.89
-
1
votes1
answer261
viewsQ: Direct sum in PHP
I have a service control system. I would like to issue a service report and add up those figures but I did not want to do with the command on sql want to do right in the php, type sum of column…
-
1
votes2
answers1887
viewsQ: property registration php mysql
Good morning, I’m doing a system of promising and would like to know how to register the plots in the comics with the information. I would like to insert the information as follows: in the…
-
0
votes1
answer2100
viewsQ: Doubt with PHP file_get_contents
my code running on the pc works 100% but when I play on the server it does not capture the information. follows code so that you help me <link type="text/css" rel="stylesheet"…
phpasked Cristiano Cardoso Silva 356 -
1
votes3
answers300
viewsA: Relationship of tables
With the help of @Andrebaill we reached the following SELECT SELECT *,cad_trabalho.id_trabalho as trabalho, DATE_FORMAT(data_saida_trabalho, '%d/%m/%Y') AS data_saida,…
-
1
votes3
answers300
viewsA: Relationship of tables
Opa I was able to solve with the following SELECT SELECT *,DATE_FORMAT(data_saida_trabalho, '%d/%m/%Y') AS data_saida FROM cad_trabalho JOIN cad_paciente ON cad_trabalho.id_paciente =…
-
1
votes3
answers300
viewsQ: Relationship of tables
Good Night, I have a database with several tables and need to make a query relationship 4 tables CREATE TABLE IF NOT EXISTS `cad_cliente` ( `id_cliente` smallint(5) unsigned NOT NULL, `nome_cliente`…
-
0
votes1
answer686
viewsA: Implement slider for automatic transition
This slider that Voce wants and full width in a box or in the background of the site? Try it like this `$(function(){ $("#slider li:first").fadeIn(); setInterval( "simpleSlider()", 3000 ); });`…
-
0
votes1
answer159
viewsQ: Error while retrieving content from external website
I have a code that searches a content inside an external site in the G1 case, it works perfectly but brings me with the page CSS so I can not customize to leave in the pattern of my site, searching…
phpasked Cristiano Cardoso Silva 356 -
3
votes2
answers28630
viewsQ: Convert Mysql data dd/mm/yyyy to yyyy-mm-dd
I have a database where I entered the dates in the format dd/mm/yyyy (example: 05/11/1987), but now I’m organizing some reports and need to update all dates in the database to the format yyyy-mm-dd…
-
0
votes3
answers107
viewsA: Doubt with relation of tables
Good morning my friends, with the tips of our friendly here I managed to solve my select that was like this SELECT * FROM cad_trabalho JOIN cad_paciente ON cad_trabalho.id_paciente JOIN cad_cliente…
-
0
votes3
answers107
viewsA: Doubt with relation of tables
I have tested here but does not search the information in the database and still generates an error Notice: Trying to get property of non-object in C:\xampp\htdocs\lista_servicos.php on line 18…
-
4
votes3
answers107
viewsQ: Doubt with relation of tables
Good evening I have the following BD in Mysql CREATE TABLE IF NOT EXISTS `cad_cliente` ( `id_cliente` smallint(5) unsigned NOT NULL, `nome_cliente` varchar(45) NOT NULL, `nome_dr` varchar(45) NOT…
-
0
votes3
answers983
viewsQ: Get URL Code ID and insert into JS
How to get the code galeria of url http://URL/galerias.php?galeria=casais and put in js? $(document).ready(function() { $('#conteudo').load('galeria.php?galeria='prodId'', function(){ $('#gallery…