Questions tagged as 'mysql'

1
answer

Loop for MySql field sum

Dear, I have two tables, where table1 has columns from A1 to A4, B1 to B4, C1 to C4 and D1 to D4, all of type decimal (4.2) and with n rows; and table2 has 3 columns being Total1, Total2 and Total3, where the sum of the fields in table1 must be...
asked by 03.11.2014 / 17:29
1
answer

Clear json array after Ajax coming from a PHP file

Does anyone know how to clean a json array via ajax coming from a php file? I have a setInterval that checks every 2 seconds and receives data from a php file (this data is brought as array json, I can see in the chrome or firefox XHR) but inste...
asked by 20.03.2015 / 15:10
2
answers

how to select an option and update the values (price, images ...) that are in the database?

I have a system of budgets of computers in the site, with several options, and I want that when selecting an option update the values of the page without the refresh. For what I researched I will need to use 'ajax', however I have no idea how to...
asked by 11.10.2014 / 02:52
1
answer

Update on another line on the same table by Trigger

Is there any way to do an update in the same table, in another line, by after insert or before insert ?     
asked by 10.10.2014 / 15:06
1
answer

Migrating a database from one server to another

I have an E-Commerce that I developed through Wordpress, all his DB was on my old server, with the URL link Now, already finished, I have to export everything to link I have already exported the files, I installed the Database on the new...
asked by 04.10.2014 / 18:33
1
answer

Popular table with PHP and JSON

I'm developing a system that has a customer table, this table was not developed by me, so I'm having some problems to popular. Visually the table works perfectly, but when I try to populate with database records, they do not appear. I have...
asked by 15.10.2014 / 21:54
1
answer

Search 3 results from the same table grouped by the same id

I have tbl_ocorrencias that records occurrences of a particular vehicle. That is, the table consists of the following: - tbl_ocorrencias - id_ocorrencia id_viatura data hora In this case, an instance only has one vehicle...
asked by 07.08.2014 / 11:44
1
answer

Searching for the next record and the previous record using two columns for sorting different tables

I have the following database structure: ___ Table: modules___ id int(10) name varchar(50) position int(10) ___ Table: lessons ___ id int(10) module_id int(10) FK position int(10) name varchar(50) Considering that you have the following da...
asked by 22.08.2014 / 00:22
2
answers

Select only 1 record with equal category and hidden in others

I have to list a few thumbs of the same category, but I want it to appear 1 for the user and the others to be hidden in the code. I'm seeing with GROUP BY category only if I do this and I give while() it lists only one per category and...
asked by 19.08.2014 / 07:59
1
answer

select like to return a sting without line break

I'm using the following query: select distinct con_destinatario from tab_conhecimento where con_destinatario like '%CALLE%' order by con_destinatario; and I get several results of this type: A.S. OPORTUNIDADES Y NEGOCIOS S.R.L. CA...
asked by 21.08.2014 / 21:06