Questions tagged as 'mysql'

0
answers

PHP - determine values in euros and credits

I have a sales site where I use credits for "discounts." What I want to do is if the product is 5.00 € and if the user has 100 credits These 100 credits will discount X value at 5.00 €. Example, Knowing that 10 credits deduct about 0.01...
asked by 07.11.2017 / 21:16
0
answers

correct sql query does not work in php

I have a query, where this query works perfectly in mysql workbench, however in php it does not work. $dados = explode("-",$ids); $sql = "SELECT prt_produto_item.nome as nome_item, prt_produto_item.q...
asked by 24.07.2017 / 19:19
0
answers

Slow reporting

Well I'm having some bottlenecks in my application and I'm not identifying the problem. I will try to explain as much as possible what happens and the configuration I use. Server Settings I use a Jelastic server with 2 environments. One ru...
asked by 26.07.2017 / 19:29
3
answers

Error in declarations with Array

Well, I have an error that I can not find the solution. I have two hosting in the same place Hostgator, in a hosting my application is all right and working. But I needed to migrate the application to another address, in other words I migrated t...
asked by 09.08.2016 / 15:39
0
answers

Request on the same page with XMLHttpRequest

Good morning, I am using a script with 3 files. - > index.php (where the request is made) -> contact.php (it is the search and processing of the request) -> ajax.js (which reads and loads the contact.php file by XMLHttpRequest) Problem,...
asked by 26.06.2017 / 10:01
2
answers

Use an if with two selects

I am doing a query, in which the second query can give "NULL" or a value (if there is data). SELECT *, (SELECT tb1.image FROM ce_users_images tb1 WHERE tb1.iduser = users.iduser LIMIT 1) AS tmp1 FROM ce_users users WHERE users.id_us...
asked by 26.06.2017 / 12:47
0
answers

What causes the invalid JSON error? [closed]

I have already done what was said in this post: json_encode - Invalid JSON and has not yet been resolved, so I'm asking. I'm using the jquery datatables server side. I did the server side activation with the default repository in the datata...
asked by 03.07.2017 / 17:00
3
answers

How to redirect user after login according to user type?

In the system there are 2 types of users 1 = admin and 2 = teacher, and after logging in I need to redirect each one to a different page. This is my php and html code.        require "lib/authenticate.php"; $error = false; $password = $email =...
asked by 08.06.2017 / 19:46
0
answers

How to configure mySQL and apache manually? [closed]

I used xamp but it always gave some port problems, so I downloaded and configured apache and PHP manually, but now I do not know how to configure the workbench and integrate it with apache     
asked by 21.08.2017 / 20:18
1
answer

Mysql Division by ZERO, SQL_MODE = 'TRADITIONAL'?

I am having SQL_MODE of MySQL as in version is 5.7.18 and according to documentation this mode would make MySQL function equally the other banks such as SQL Server . But when I do: select 651/0; inst...
asked by 28.04.2017 / 22:04