Questions tagged as 'mysql'

0
answers

SQL query in PHP

I want to execute this sql1 and if it does not return any results I execute sql2 and present it, but that is not working, when sql1 returns the result it shows right, but when it does not have result, the result is not displayed of sql2. How sho...
asked by 23.08.2018 / 14:06
0
answers

How do I make pages limit EX pagination: 1,2,3,4 ..., do not leave all numbers in view from 1 to 50 [duplicate]

<?php include_once("conexao.php"); $pagina = (isset($_GET['pagina']))? $_GET['pagina'] : 1; $result_curso = "SELECT * FROM cursos"; $resultado_curso = mysqli_query($conn, $result_curso); $total_cursos = mysqli_num_rows($resultado_curso)...
asked by 23.08.2018 / 14:17
6
answers

How to do SELECT with ORDER BY and different criteria?

How can I make a select with 2 "ORDER BY"? CATEGORY table: If I do a SELECT like this: select id,nome from CATEGORIA ORDER BY nome ASC MySQL returns the names in alphabetical order, but I need them to always return the id: 10...
asked by 20.06.2016 / 22:04
2
answers

doubts about php authentication

When I test the login , I go to autenticar.php , but the screen goes blank instead of heading to the main page. msql and php command tested and working) <script language="javascript"> function sucesso(){ setTimeout(...
asked by 26.07.2018 / 19:23
2
answers

Filter in a Select MYSQL via PHP (ionic 3)

Good afternoon everyone, before explaining a little more about the doubt I would like to make it clear that I am very lazy on the subject and, incredible as it may seem, I have been trying for weeks to solve this problem. Doubt: I would like to...
asked by 20.07.2018 / 16:53
0
answers

Spring + JPA, transient field visible in View and not persistent?

Good evening guys, I have a filter that I do manually with @query () that in it I do a total calculating join of a sale ie SUM(valor * quantidade) as total I'm not sure what to do. what happens is this, this total "temporary" field that ref...
asked by 13.08.2018 / 23:46
1
answer

How to rollback a specific table

I have a backup of my entire base of all tables from the following command: mysqldump --default-character-set=latin1 -u root -p[senha] [base] > Z:Backup I wanted to do something like this: mysqldump --default-character-set=latin1 -u ro...
asked by 18.07.2018 / 21:57
1
answer

Problem in changing bank data

I'm trying to change the database's data, however, when sending it does not display an error message and it does not change the data. What can be happening? if (isset($_POST['enviar'])) { //Slide $novo_slide1 = mysqli_escape_string($co...
asked by 10.07.2018 / 18:21
1
answer

Percentage calculation in mysql

I have a reservation table that has ID, ORIGIN (site, app or null) I want to know the percentage of reservations made by the app and the site, select count(id) from booking where origin = 'app' / select count(id) from booking where origin is n...
asked by 11.07.2018 / 14:22
1
answer

Jquey does not work with elements inserted using .html ()

Good evening people, so .. I have an ajax code that catches a loop inside a php file and then inserts the result into an html page. So far, everything works. The problem is at the time I want to manipulate some class that was entered using .html...
asked by 07.07.2018 / 00:45