Questions tagged as 'sql'

2
answers

Query returns empty using PHP with PDO and MS SQLServer

I am migrating a system made in ASP to PHP. However, I'm having trouble making a query using the PDO: Search.php class Busca extends Conexao { private $termo; public function setTermo($termo) { $this->termo = $termo; } pu...
asked by 11.11.2015 / 19:15
2
answers

Using case in field null

I have the following structure tb_bulletin: |Cod|boletim|dt_enviado| | 1 | N | NULL | | 2 | S |24/08/2018| | 3 | S | NULL | | 4 | S |23/08/2018| | 5 | S |23/08/2018| | 6 | S | NULL | | 7 | N | NULL |...
asked by 24.08.2018 / 15:19
1
answer

Security in php failing

I created a small security code for my login system, to prevent people from compiling the administrative panel link and pasting and accessing it. <?php ob_start(); if(($_SESSION['usuarioNome'] == "") || $_SESSION['usuarioNivelAcesso'] =...
asked by 13.07.2017 / 14:53
2
answers

Count number of records in a database

I want to count the number of records in a database table. I have 3 records in my DB, but the result is always 1. I used this code: $base_hndl = new SQLite3("p.sqlite"); $select = "SELECT COUNT(*) FROM users"; $resultat = $base_hndl->exec($...
asked by 10.11.2014 / 01:13
3
answers

How to get around an accent in mysql + Php

I have in my database words with accents and when I want to call I use this SQL below. But if a word in the database has an accent I also need to use the word accented in my search, otherwise it returns nothing. How do I get around this si...
asked by 15.12.2014 / 13:46
3
answers

Protocol for documents

I'm doing a program in php, mysql and would like to generate a protocol with some argument. The protocol would be automatically generated in the system, without user interference, however it would have to be the following standards: Numbe...
asked by 18.08.2017 / 20:48
4
answers

SQL query comparing two fields from the same table

I have a table in SQL Server and I'm having a hard time making a query. I have a table like this: alunos ra nome serie cod_curso 23 joão 1 EI 23 joão 2 EI 23 joão 3 EI 44 mari...
asked by 12.11.2015 / 11:51
2
answers

Error: Object reference not set to an instance of an object, how to solve?

I have the ChamadaEfetuada(MAluno) : bool method that verifies that the call was made for a given student, this method is used in another method ChamadaEfetuada() : bool that instead of checking if the call was made to a single stu...
asked by 19.11.2015 / 02:57
1
answer

make select only by the month of a given column - mysql

I want to do select with the condition that the column has a given month, and only brings results this month. I was doing this, but it did not work. SELECT * from funcionarios where dataEntrada = month(10); I'm using mysql workbeanch   ...
asked by 13.09.2015 / 03:07
3
answers

Will I lose my databases if I upgrade SQL Server 2012 Express to Standard?

I have installed an instance 2012 Express, I need to upgrade to Standard, but to update I need to make sure that there is no change in the databases.     
asked by 17.09.2015 / 21:38