Questions tagged as 'sql'

1
answer

Show more than one column value from dropdown C #

How could I show more than the value of a column in a dropdown? I tried the following method: private void BindDropDownList() { DataTable dt = new DataTable(); string localidade = string.Empty; string distrito =...
asked by 12.07.2015 / 00:38
1
answer

Anti SQL Injection (I've tried everything but Havij still catches it)

Hello! I'm going through a lot of bugs, I've tried ALL the techniques I found on the internet that could prevent SQL Injection, and even then Havij can get my data. This is the code for the page that I'm doing the attack: $id = mysql_real_e...
asked by 11.07.2015 / 02:20
1
answer

I can not import data from a CSV to PostGreSQL with dbWriteTable from R

I am trying to import a CSV into a PostGreSQL database from R. On the PostGreSQL server, I created an empty database, called "Data". library(RPostgreSQL) library(sqldf) drv <- dbDriver("PostgreSQL") con <- dbConnect(drv...
asked by 09.10.2014 / 23:44
1
answer

Change character and collation settings

I have a configuration in a database as follows: SERVIDOR 1 show variables like '%version%'; innodb_version 1.1.8 protocol_version 10 slave_type_conversions version 5.5.19-log version_comment My...
asked by 11.12.2014 / 00:41
1
answer

query by the number of the day of the week Mysql

The week has 7 days, so I want to be able to make an appointment depending on the day of the week you choose to show the result: mysql_query("SELECT * FROM tbl_eventos WHERE WEEK(data) = '$semana_atual' AND YEAR(data) = '$ano_atual'"); Now...
asked by 11.02.2015 / 16:31
1
answer

How to merge multiple updates into different tables?

I have 3 updates, and the tables I have to give the updates have 2 million records, so it would be unfeasible to do one by one, since each one takes more than half an hour to run, and wait for one to finish. running the other is not productive....
asked by 07.08.2018 / 15:42
0
answers

Select with SUM until sum B is equal to or less than A

I have two tables, products and lots: Products codigo qtdatual Lots codigo qtdlote validade A% example would be: SELECT P.CODIGO, L.QTDLOTE, L.VALIDADE FROM LOTES L INNER JOIN PRODUTOS P ON(P.CODIGO = L.CODIGO) WHERE (P.QTDATU...
asked by 17.08.2018 / 15:05
0
answers

Connect Firebird via PHP

I have a Firebird DB on a server other than the web server (PHP). I'm trying to make the connection between them, using the ibase_connect function, but nothing happens, my line in php is: $dbh=ibase_connect($host,$username,$password) or die(i...
asked by 03.08.2018 / 15:46
1
answer

Build SQL to generate a dataset and populate a Treeview

I'm having a database here and I'm looking to set up a SQL to generate a dataset in Delphi and then populate a Treeview. The figure below shows part of the bank, but that is the general structure of it: Basicallytheuserlogsintothesystem(tbuse...
asked by 23.06.2015 / 14:45
1
answer

Microsoft SQL Server Error 10060

Recently I formatted my computer and reinstalled the applications. Among them is SQL Server 2014. The problem is that I can not connect to the ISP server! I uninstalled the 2014 version and installed 2012 and the problem persists. Only on my mac...
asked by 29.09.2014 / 21:24