Questions tagged as 'mysql'

1
answer

Return query sorted by date, not working [closed]

SELECT * FROM eventos ORDER BY Datainicio DESC I'm sending this way to my mysql database, the first time I try to organize data by date, can someone tell me why my events are not sorted?     
asked by 29.06.2015 / 11:40
1
answer

SQL Query Optimization

I've set up a series of SQL but I'm having difficulty generating something that stresses less the server, I ask for help from you. Follow SQL: SELECT '2015-06-10 00:00:00' AS 'Hora', COUNT(id_contato) AS 'Total' FROM contato WHERE data_hora...
asked by 10.06.2015 / 22:05
3
answers

limit in codeigniter

I have a code that takes the data from the database and shows it in a table. I need only the first two records to appear. For this I put a limit on my code. But it is not limiting, but taking the total and decreasing by the number. EX: $th...
asked by 21.07.2015 / 15:04
0
answers

Error Publishing Locaweb - ASP.NET with MySql

I posted a site on Locaweb: .Net + MySql + MVC 4 + EF6 For more details on the error: link Detail: Location runs normally. But when I published, the following occurs: 'Cannot perform CAS Asserts in Security Transparent methods'    ...
asked by 23.07.2015 / 08:20
1
answer

When you have no news message appears

Hello, I have a news system and I wanted a message to appear when I did not have any news in my database. Code: <?php $news8 = mysql_query("SELECT * FROM 10cms_noticias WHERE status = 'Ativo' ORDER BY ID DESC LIMIT 8") or die(mysql_error...
asked by 23.07.2015 / 23:54
0
answers

View parcels on product page prestashop [closed]

Good morning, I would like to know if anyone could help me by showing me how I can display the price and quantity of parcels on a product detail page (product.tpl) in prestashop. Example: 10 x of $ 10.00 . If anyone knows thank you right away....
asked by 31.05.2015 / 07:43
1
answer

LEFT JOIN with WHERE in the field of the first table OR field of the second table

SELECT COALESCE(tb2.numero_novo, tb1.numero_original) as numero FROM tb1 LEFT JOIN tb2 ON tb2.id = tb1.id WHERE tb1.numero_original = <PARAM> OR tb2.numero_novo = <PARAM> The above query generates a full table scan. How to optimiz...
asked by 27.05.2015 / 19:56
0
answers

In the return call function to execute a query in MySQL

I need to query my DB when returning from a insert , but I'm not able to implement it. I have this in return: $.post( 'GravaFase.php', params, function( json, textStatus, jQxhr ) {...
asked by 31.07.2015 / 22:59
1
answer

How to make a refresh more dynamic?

Is there any method of fetching data from a server by putting it directly to a page without having to use a basic javascript example: ?? setInterval(function() { $.ajax({ type: "POST", url: "retorno.php", data: 'id=1',...
asked by 31.07.2015 / 18:41
1
answer

Wamp does not start mysql when restarting the PC [closed]

Whenever I restart my PC, my Wamp does not open Mysql . I have to reinstall and I end up losing my seats. The wamp server opens, but the icon turns yellow. This happened after I installed Python / Django and Nodejs . I do not know which one...
asked by 21.05.2015 / 23:18